FTP uses ruserpass() differently from that in libcompat. Fix rexec to
recognize that the new ruserpass returns an int (but ignore it for now), and ruserpass does not accept an acct pointer.
This commit is contained in:
parent
bceb6b5729
commit
64288566a1
|
@ -36,7 +36,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: rexec.c,v 1.6 1997/10/09 10:21:00 lukem Exp $");
|
__RCSID("$NetBSD: rexec.c,v 1.7 1998/03/19 18:06:15 tv Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ __RCSID("$NetBSD: rexec.c,v 1.6 1997/10/09 10:21:00 lukem Exp $");
|
||||||
|
|
||||||
int rexecoptions;
|
int rexecoptions;
|
||||||
|
|
||||||
void ruserpass __P((const char *, char **, char **));
|
int ruserpass __P((const char *, char **, char **));
|
||||||
int rexec __P((char **, int, char *, char *, char *, int *));
|
int rexec __P((char **, int, char *, char *, char *, int *));
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -75,7 +75,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
*ahost = hp->h_name;
|
*ahost = hp->h_name;
|
||||||
ruserpass(hp->h_name, &name, &pass);
|
(void)ruserpass(hp->h_name, &name, &pass);
|
||||||
retry:
|
retry:
|
||||||
s = socket(AF_INET, SOCK_STREAM, 0);
|
s = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (s < 0) {
|
if (s < 0) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ruserpass.c,v 1.1 1998/03/19 17:51:04 tv Exp $ */
|
/* $NetBSD: ruserpass.c,v 1.2 1998/03/19 18:06:15 tv Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1985, 1993, 1994
|
* Copyright (c) 1985, 1993, 1994
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95";
|
static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: ruserpass.c,v 1.1 1998/03/19 17:51:04 tv Exp $");
|
__RCSID("$NetBSD: ruserpass.c,v 1.2 1998/03/19 18:06:15 tv Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -90,12 +90,12 @@ static struct toktab {
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int ruserpass __P((const char *, char **, char **, char **));
|
int ruserpass __P((const char *, char **, char **));
|
||||||
|
|
||||||
int
|
int
|
||||||
ruserpass(host, aname, apass, aacct)
|
ruserpass(host, aname, apass)
|
||||||
const char *host;
|
const char *host;
|
||||||
char **aname, **apass, **aacct;
|
char **aname, **apass;
|
||||||
{
|
{
|
||||||
char *hdir, buf[BUFSIZ], *tmp;
|
char *hdir, buf[BUFSIZ], *tmp;
|
||||||
char myname[MAXHOSTNAMELEN], *mydomain;
|
char myname[MAXHOSTNAMELEN], *mydomain;
|
||||||
|
@ -181,11 +181,6 @@ next:
|
||||||
warnx("Remove account or make file unreadable by others.");
|
warnx("Remove account or make file unreadable by others.");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
if (token() && *aacct == NULL) {
|
|
||||||
*aacct = strdup(tokval);
|
|
||||||
if (*aacct == NULL)
|
|
||||||
err(1, "can't strdup *aacct");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MACDEF:
|
case MACDEF:
|
||||||
while ((c=getc(cfile)) != EOF)
|
while ((c=getc(cfile)) != EOF)
|
||||||
|
|
Loading…
Reference in New Issue