From b112bf188c2fba2979896df0007cb872f75fb3ba Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 7 Aug 1998 15:47:38 +0000 Subject: [PATCH] * ftp.c (getreply): Restore proper setting of safe. This variable was previously being set to the value of code rather than to the boolean expression (code == 631), which it had been previously. The bug resulted in all replies from the server being parsed as krb_safe messages even when they were krb_priv messages. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10788 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/ChangeLog | 8 ++++++++ src/appl/gssftp/ftp/ftp.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 2bad1481d..473c9ad45 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,11 @@ +Fri Aug 7 11:45:17 1998 Tom Yu + + * ftp.c (getreply): Restore proper setting of safe. This variable + was previously being set to the value of code rather than to the + boolean expression (code == 631), which it had been previously. + The bug resulted in all replies from the server being parsed as + krb_safe messages even when they were krb_priv messages. + 1998-05-06 Theodore Ts'o * radix.c (argv): POSIX states that getopt returns -1 when it diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index 2fbe8e468..85e01b5dd 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -597,7 +597,7 @@ getreply(expecteof) if (code != 631 && code != 632 && code != 633) { printf("Unknown reply: %d %s\n", code, obuf); n = '5'; - } else safe = code; + } else safe = (code == 631); if (obuf[0]) /* if there is a string to decode */ if (!auth_type) { printf("Cannot decode reply:\n%d %s\n", code, obuf); -- 2.26.2