Cmd cmdtab[] =
{
{ "abor", abortcmd, 0, },
+ { "allo", nopcmd, 1, },
{ "appe", appendcmd, 1, },
{ "cdup", cdupcmd, 1, },
{ "cwd", cwdcmd, 1, },
{
char buf[8192];
va_list arg;
- char errstr[ERRMAX];
- rerrstr(errstr, sizeof errstr);
va_start(arg, fmt);
vseprint(buf, buf+sizeof(buf), fmt, arg);
va_end(arg);
syslog(0, FTPLOG, "%s.%s %s", nci->rsys, nci->rserv, buf);
- werrstr(errstr, sizeof errstr);
}
static void
if(isnone){
fd = open("#s/boot", ORDWR);
if(fd < 0
- || bind("#/", "/", MAFTER) < 0
- || amount(fd, "/bin", MREPL, "") < 0
- || bind("#c", "/dev", MAFTER) < 0
- || bind(bindir, "/bin", MREPL) < 0)
+ || bind("#/", "/", MAFTER) == -1
+ || amount(fd, "/bin", MREPL, "") == -1
+ || bind("#c", "/dev", MAFTER) == -1
+ || bind(bindir, "/bin", MREPL) == -1)
exits("building name space");
close(fd);
}
{
char namefile[128];
AuthInfo *ai;
+ Dir nd;
if(response == nil)
response = "";
ch->nresp = strlen(response);
ai = auth_response(ch);
if(ai == nil || auth_chuid(ai, nil) < 0) {
+ auth_freeAI(ai);
slowdown();
return reply("530 Not logged in: %r");
}
+ /* chown network connection */
+ nulldir(&nd);
+ nd.mode = 0660;
+ nd.uid = ai->cuid;
+ dirfwstat(0, &nd);
+
+ auth_freeAI(ai);
auth_freechal(ch);
ch = nil;
rv = 0;
- if(bind("#/", "/", MAFTER) < 0){
+ if(bind("#/", "/", MAFTER) == -1){
logit("can't bind #/ to /: %r");
return reply("500 can't bind #/ to /: %r");
}
- if(bind(nci->spec, "/net", MBEFORE) < 0){
+ if(bind(nci->spec, "/net", MBEFORE) == -1){
logit("can't bind %s to /net: %r", nci->spec);
rv = reply("500 can't bind %s to /net: %r", nci->spec);
unmount("#/", "/");