if builtin_ls failes, return error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10859 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -312,6 +312,11 @@ main(int argc, char **argv)
|
|||||||
defumask = val;
|
defumask = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sp = getservbyname("ftp", "tcp");
|
||||||
|
if(sp)
|
||||||
|
port = sp->s_port;
|
||||||
|
else
|
||||||
|
port = htons(21);
|
||||||
if(port_string) {
|
if(port_string) {
|
||||||
sp = getservbyname(port_string, "tcp");
|
sp = getservbyname(port_string, "tcp");
|
||||||
if(sp)
|
if(sp)
|
||||||
@@ -321,12 +326,6 @@ main(int argc, char **argv)
|
|||||||
port = htons(atoi(port_string));
|
port = htons(atoi(port_string));
|
||||||
else
|
else
|
||||||
warnx("bad value for -p");
|
warnx("bad value for -p");
|
||||||
} else {
|
|
||||||
sp = getservbyname("ftp", "tcp");
|
|
||||||
if(sp)
|
|
||||||
port = sp->s_port;
|
|
||||||
else
|
|
||||||
port = htons(21);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxtimeout < ftpd_timeout)
|
if (maxtimeout < ftpd_timeout)
|
||||||
@@ -2165,8 +2164,10 @@ list_file(char *file)
|
|||||||
if (dout == NULL)
|
if (dout == NULL)
|
||||||
return;
|
return;
|
||||||
set_buffer_size(fileno(dout), 0);
|
set_buffer_size(fileno(dout), 0);
|
||||||
builtin_ls(dout, file);
|
if(builtin_ls(dout, file) == 0)
|
||||||
reply(226, "Transfer complete.");
|
reply(226, "Transfer complete.");
|
||||||
|
else
|
||||||
|
reply(451, "Requested action aborted. Local error in processing.");
|
||||||
fclose(dout);
|
fclose(dout);
|
||||||
data = -1;
|
data = -1;
|
||||||
pdata = -1;
|
pdata = -1;
|
||||||
|
Reference in New Issue
Block a user