svn rev #3270: trunk/gssftp/ftpd/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu Aug 20 08:42:48 EDT 2009
Commit By: ghudson
Log Message:
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 trunk/gssftp/ftpd/ftpd.c
Modified: trunk/gssftp/ftpd/ftpd.c
===================================================================
--- trunk/gssftp/ftpd/ftpd.c 2009-07-20 17:21:24 UTC (rev 3269)
+++ trunk/gssftp/ftpd/ftpd.c 2009-08-20 12:42:48 UTC (rev 3270)
@@ -756,11 +756,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 Krb5-appl-commits
mailing list