diff options
author | nectar <nectar@FreeBSD.org> | 2002-08-30 21:23:27 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-08-30 21:23:27 +0000 |
commit | a77dba08ca7d8ad2f2dcd653974ac66df78cfa49 (patch) | |
tree | 6015f89700252fb05eb8fa267c46dba41913e9d8 /crypto/heimdal/appl/ftp/ftpd/ftpd.c | |
parent | 69a91bec14ec3ad49d1c8a82c40a796755f9e4a3 (diff) | |
download | FreeBSD-src-a77dba08ca7d8ad2f2dcd653974ac66df78cfa49.zip FreeBSD-src-a77dba08ca7d8ad2f2dcd653974ac66df78cfa49.tar.gz |
Import of Heimdal Kerberos from KTH repository circa 2002/08/29.
Diffstat (limited to 'crypto/heimdal/appl/ftp/ftpd/ftpd.c')
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/ftpd.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crypto/heimdal/appl/ftp/ftpd/ftpd.c b/crypto/heimdal/appl/ftp/ftpd/ftpd.c index 7dde742..c1720ba 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.160 2001/09/13 09:17:14 joda Exp $"); +RCSID("$Id: ftpd.c,v 1.161 2002/02/28 15:50:14 joda Exp $"); static char version[] = "Version 6.00"; @@ -312,6 +312,11 @@ main(int argc, char **argv) defumask = val; } } + sp = getservbyname("ftp", "tcp"); + if(sp) + port = sp->s_port; + else + port = htons(21); if(port_string) { sp = getservbyname(port_string, "tcp"); if(sp) @@ -321,12 +326,6 @@ main(int argc, char **argv) port = htons(atoi(port_string)); else warnx("bad value for -p"); - } else { - sp = getservbyname("ftp", "tcp"); - if(sp) - port = sp->s_port; - else - port = htons(21); } if (maxtimeout < ftpd_timeout) @@ -2165,8 +2164,10 @@ list_file(char *file) if (dout == NULL) return; set_buffer_size(fileno(dout), 0); - builtin_ls(dout, file); - reply(226, "Transfer complete."); + if(builtin_ls(dout, file) == 0) + reply(226, "Transfer complete."); + else + reply(451, "Requested action aborted. Local error in processing."); fclose(dout); data = -1; pdata = -1; |