const poisoning.

This commit is contained in:
mycroft 1998-07-26 21:25:16 +00:00
parent b9aeeb3fa1
commit a5b2c458ca
2 changed files with 14 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: edit.c,v 1.11 1998/02/04 15:21:53 christos Exp $ */
/* $NetBSD: edit.c,v 1.12 1998/07/26 21:25:16 mycroft Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: edit.c,v 1.11 1998/02/04 15:21:53 christos Exp $");
__RCSID("$NetBSD: edit.c,v 1.12 1998/07/26 21:25:16 mycroft Exp $");
#endif
#endif /* not lint */
@ -132,7 +132,7 @@ display(tempname, fd, pw)
*pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
else
list[E_SHELL].restricted = 1;
bp = pw->pw_gecos;
bp = strdup(pw->pw_gecos);
p = strsep(&bp, ",");
(void)fprintf(fp, "Full Name: %s\n", p ? p : "");
p = strsep(&bp, ",");
@ -212,8 +212,9 @@ bad: (void)fclose(fp);
strlen(list[E_HPHONE].save) + strlen(list[E_LOCATE].save) + 4;
if (!(p = malloc(len)))
err(1, "malloc");
(void)snprintf(pw->pw_gecos = p, len, "%s,%s,%s,%s", list[E_NAME].save,
(void)snprintf(p, len, "%s,%s,%s,%s", list[E_NAME].save,
list[E_LOCATE].save, list[E_BPHONE].save, list[E_HPHONE].save);
pw->pw_gecos = p;
if (snprintf(buf, sizeof(buf),
"%s:%s:%d:%d:%s:%lu:%lu:%s:%s:%s",

View File

@ -1,4 +1,4 @@
/* $NetBSD: pw_yp.c,v 1.13 1998/07/05 14:26:06 mrg Exp $ */
/* $NetBSD: pw_yp.c,v 1.14 1998/07/26 21:25:16 mycroft Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
#else
__RCSID("$NetBSD: pw_yp.c,v 1.13 1998/07/05 14:26:06 mrg Exp $");
__RCSID("$NetBSD: pw_yp.c,v 1.14 1998/07/26 21:25:16 mycroft Exp $");
#endif
#endif /* not lint */
@ -168,13 +168,13 @@ pw_yp(pw, uid)
}
/* tell rpc.yppasswdd */
yppasswd.newpw.pw_name = pw->pw_name;
yppasswd.newpw.pw_passwd= pw->pw_passwd;
yppasswd.newpw.pw_uid = pw->pw_uid;
yppasswd.newpw.pw_gid = pw->pw_gid;
yppasswd.newpw.pw_gecos = pw->pw_gecos;
yppasswd.newpw.pw_dir = pw->pw_dir;
yppasswd.newpw.pw_shell = pw->pw_shell;
yppasswd.newpw.pw_name = strdup(pw->pw_name);
yppasswd.newpw.pw_passwd = strdup(pw->pw_passwd);
yppasswd.newpw.pw_uid = pw->pw_uid;
yppasswd.newpw.pw_gid = pw->pw_gid;
yppasswd.newpw.pw_gecos = strdup(pw->pw_gecos);
yppasswd.newpw.pw_dir = strdup(pw->pw_dir);
yppasswd.newpw.pw_shell = strdup(pw->pw_shell);
client = clnt_create(master, YPPASSWDPROG, YPPASSWDVERS, "udp");
if (client == NULL) {