summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/ftp/ftpd/ftpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/appl/ftp/ftpd/ftpd.c')
-rw-r--r--crypto/heimdal/appl/ftp/ftpd/ftpd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/heimdal/appl/ftp/ftpd/ftpd.c b/crypto/heimdal/appl/ftp/ftpd/ftpd.c
index 4db5e9f..faf07ff 100644
--- a/crypto/heimdal/appl/ftp/ftpd/ftpd.c
+++ b/crypto/heimdal/appl/ftp/ftpd/ftpd.c
@@ -38,7 +38,7 @@
#endif
#include "getarg.h"
-RCSID("$Id: ftpd.c,v 1.153 2001/01/18 09:14:59 joda Exp $");
+RCSID("$Id: ftpd.c,v 1.157 2001/04/19 14:41:29 joda Exp $");
static char version[] = "Version 6.00";
@@ -262,7 +262,7 @@ main(int argc, char **argv)
int optind = 0;
- set_progname (argv[0]);
+ setprogname (argv[0]);
/* detach from any tickets and tokens */
{
@@ -1187,18 +1187,22 @@ do_store(char *name, char *mode, int unique)
goto done;
set_buffer_size(fileno(din), 1);
if (receive_data(din, fout) == 0) {
+ if((*closefunc)(fout) < 0)
+ perror_reply(552, name);
+ else {
if (unique)
reply(226, "Transfer complete (unique file name:%s).",
name);
else
reply(226, "Transfer complete.");
- }
+ }
+ } else
+ (*closefunc)(fout);
fclose(din);
data = -1;
pdata = -1;
done:
LOGBYTES(*mode == 'w' ? "put" : "append", name, byte_count);
- (*closefunc)(fout);
}
static FILE *
@@ -2161,7 +2165,7 @@ send_file_list(char *whichf)
char buf[MaxPathLen];
if (strpbrk(whichf, "~{[*?") != NULL) {
- int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
+ int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT;
memset(&gl, 0, sizeof(gl));
freeglob = 1;
OpenPOWER on IntegriCloud