svn rev #22812: branches/krb5-1-7/src/appl/gssftp/ftpd/

tlyu@MIT.EDU tlyu at MIT.EDU
Mon Sep 28 21:39:02 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22812
Commit By: tlyu
Log Message:
ticket: 6543
version_fixed: 1.7.1
status: resolved

pull up r22519 from trunk

 ------------------------------------------------------------------------
 r22519 | ghudson | 2009-08-12 14:53:47 -0400 (Wed, 12 Aug 2009) | 12 lines

 ticket: 6543
 subject: Reply message ordering bug in ftpd
 tags: pullup
 target_version: 1.7

 user() was replying to the user command and then calling login(),
 which could send a continuation reply if it fails to chdir to the
 user's homedir.  Continuation replies must come before the actual
 reply; the mis-ordering was causing ftp and ftpd to deadlock.  To fix
 the bug, invoke login() before reply() so that the continuation reply
 comes first.


Changed Files:
U   branches/krb5-1-7/src/appl/gssftp/ftpd/ftpd.c
Modified: branches/krb5-1-7/src/appl/gssftp/ftpd/ftpd.c
===================================================================
--- branches/krb5-1-7/src/appl/gssftp/ftpd/ftpd.c	2009-09-29 01:38:48 UTC (rev 22811)
+++ branches/krb5-1-7/src/appl/gssftp/ftpd/ftpd.c	2009-09-29 01:39:02 UTC (rev 22812)
@@ -758,11 +758,10 @@
 			result = 331;
 		} else
 			result = 232;
-		reply(result, "%s", buf);
-		syslog(authorized ? LOG_INFO : LOG_ERR, "%s", buf);
-
 		if (result == 232)
 			login(NULL, result);
+		reply(result, "%s", buf);
+		syslog(authorized ? LOG_INFO : LOG_ERR, "%s", buf);
 		return;
 	}
 




More information about the cvs-krb5 mailing list