From 64288566a1600800d7e3bd6a54b894f1d9e6c410 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Mar 1998 18:06:15 +0000 Subject: [PATCH] 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. --- lib/libcompat/4.3/rexec.c | 6 +++--- lib/libcompat/4.3/ruserpass.c | 15 +++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index 0668a953bab8..350577178b08 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -36,7 +36,7 @@ #if 0 static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93"; #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 /* 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; -void ruserpass __P((const char *, char **, char **)); +int ruserpass __P((const char *, char **, char **)); int rexec __P((char **, int, char *, char *, char *, int *)); int @@ -75,7 +75,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p) return (-1); } *ahost = hp->h_name; - ruserpass(hp->h_name, &name, &pass); + (void)ruserpass(hp->h_name, &name, &pass); retry: s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) { diff --git a/lib/libcompat/4.3/ruserpass.c b/lib/libcompat/4.3/ruserpass.c index cbf4f353591b..e9cb6f6934a9 100644 --- a/lib/libcompat/4.3/ruserpass.c +++ b/lib/libcompat/4.3/ruserpass.c @@ -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 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #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 /* not lint */ @@ -90,12 +90,12 @@ static struct toktab { { NULL, 0 } }; -int ruserpass __P((const char *, char **, char **, char **)); +int ruserpass __P((const char *, char **, char **)); int -ruserpass(host, aname, apass, aacct) +ruserpass(host, aname, apass) const char *host; - char **aname, **apass, **aacct; + char **aname, **apass; { char *hdir, buf[BUFSIZ], *tmp; char myname[MAXHOSTNAMELEN], *mydomain; @@ -181,11 +181,6 @@ next: warnx("Remove account or make file unreadable by others."); goto bad; } - if (token() && *aacct == NULL) { - *aacct = strdup(tokval); - if (*aacct == NULL) - err(1, "can't strdup *aacct"); - } break; case MACDEF: while ((c=getc(cfile)) != EOF)