diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-08-12 18:53:47 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-08-12 18:53:47 +0000 |
commit | c7d9d2c14150ab8df01c67fce258a27f6103eac4 (patch) | |
tree | 3d1856bd5cae0a51b7c70dc693c234fb2de5fffd /src/appl/gssftp | |
parent | 521570437918142f85a4169493d88641c9d6e42a (diff) | |
download | krb5-c7d9d2c14150ab8df01c67fce258a27f6103eac4.tar.gz krb5-c7d9d2c14150ab8df01c67fce258a27f6103eac4.tar.xz krb5-c7d9d2c14150ab8df01c67fce258a27f6103eac4.zip |
Reply message ordering bug in ftpd
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.
ticket: 6543
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22519 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/gssftp')
-rw-r--r-- | src/appl/gssftp/ftpd/ftpd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index 51072ee607..ad3c4201a8 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -758,11 +758,10 @@ user(name) 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; } |