diff options
author | Sam Hartman <hartmans@mit.edu> | 1997-08-29 03:59:43 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 1997-08-29 03:59:43 +0000 |
commit | bcf1093c576608fbec460f3dae62a1cf60a0263c (patch) | |
tree | 214c2ca6254e1ab25679404943eaa49718988858 /src | |
parent | 38da580dae38ec74e6fc1c4a2e7e0a07fd68d059 (diff) | |
download | krb5-bcf1093c576608fbec460f3dae62a1cf60a0263c.tar.gz krb5-bcf1093c576608fbec460f3dae62a1cf60a0263c.tar.xz krb5-bcf1093c576608fbec460f3dae62a1cf60a0263c.zip |
Fix bug that causes send_file_list to send no data
on short directories in safe mode.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10185 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/appl/gssftp/ftpd/ChangeLog | 4 | ||||
-rw-r--r-- | src/appl/gssftp/ftpd/ftpd.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 9b4ca1e056..d43bbdbaf5 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,7 @@ +Thu Aug 28 23:48:27 1997 Sam Hartman <hartmans@luminous.mesas.com> + + * ftpd.c (send_file_list): Flush the data before closing it. + Sun Aug 17 14:24:09 1997 Ezra Peisach <epeisach@mit.edu> * Makefile.in (SRCS): Add $(srcdir) where needed. diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index b4a5794b9b..aedacdf4e0 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -2221,7 +2221,11 @@ send_file_list(whichfiles) } (void) closedir(dirp); } - ret = secure_write(fileno(dout), "", 0); + if (dout != NULL ) { + ret = secure_write(fileno(dout), "", 0); + if (ret >= 0) + ret = secure_flush(fileno(dout)); + } data_err: if (dout == NULL) reply(550, "No files found."); @@ -2232,7 +2236,7 @@ data_err: transflag = 0; if (dout != NULL) - (void) fclose(dout); + (void) fclose(dout); data = -1; pdata = -1; } |