const poisoning.
This commit is contained in:
parent
b9aeeb3fa1
commit
a5b2c458ca
@ -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
|
* Copyright (c) 1990, 1993, 1994
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
|
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ display(tempname, fd, pw)
|
|||||||
*pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
|
*pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
|
||||||
else
|
else
|
||||||
list[E_SHELL].restricted = 1;
|
list[E_SHELL].restricted = 1;
|
||||||
bp = pw->pw_gecos;
|
bp = strdup(pw->pw_gecos);
|
||||||
p = strsep(&bp, ",");
|
p = strsep(&bp, ",");
|
||||||
(void)fprintf(fp, "Full Name: %s\n", p ? p : "");
|
(void)fprintf(fp, "Full Name: %s\n", p ? p : "");
|
||||||
p = strsep(&bp, ",");
|
p = strsep(&bp, ",");
|
||||||
@ -212,8 +212,9 @@ bad: (void)fclose(fp);
|
|||||||
strlen(list[E_HPHONE].save) + strlen(list[E_LOCATE].save) + 4;
|
strlen(list[E_HPHONE].save) + strlen(list[E_LOCATE].save) + 4;
|
||||||
if (!(p = malloc(len)))
|
if (!(p = malloc(len)))
|
||||||
err(1, "malloc");
|
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);
|
list[E_LOCATE].save, list[E_BPHONE].save, list[E_HPHONE].save);
|
||||||
|
pw->pw_gecos = p;
|
||||||
|
|
||||||
if (snprintf(buf, sizeof(buf),
|
if (snprintf(buf, sizeof(buf),
|
||||||
"%s:%s:%d:%d:%s:%lu:%lu:%s:%s:%s",
|
"%s:%s:%d:%d:%s:%lu:%lu:%s:%s:%s",
|
||||||
|
@ -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.
|
* Copyright (c) 1988 The Regents of the University of California.
|
||||||
@ -37,7 +37,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
|
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -168,13 +168,13 @@ pw_yp(pw, uid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* tell rpc.yppasswdd */
|
/* tell rpc.yppasswdd */
|
||||||
yppasswd.newpw.pw_name = pw->pw_name;
|
yppasswd.newpw.pw_name = strdup(pw->pw_name);
|
||||||
yppasswd.newpw.pw_passwd= pw->pw_passwd;
|
yppasswd.newpw.pw_passwd = strdup(pw->pw_passwd);
|
||||||
yppasswd.newpw.pw_uid = pw->pw_uid;
|
yppasswd.newpw.pw_uid = pw->pw_uid;
|
||||||
yppasswd.newpw.pw_gid = pw->pw_gid;
|
yppasswd.newpw.pw_gid = pw->pw_gid;
|
||||||
yppasswd.newpw.pw_gecos = pw->pw_gecos;
|
yppasswd.newpw.pw_gecos = strdup(pw->pw_gecos);
|
||||||
yppasswd.newpw.pw_dir = pw->pw_dir;
|
yppasswd.newpw.pw_dir = strdup(pw->pw_dir);
|
||||||
yppasswd.newpw.pw_shell = pw->pw_shell;
|
yppasswd.newpw.pw_shell = strdup(pw->pw_shell);
|
||||||
|
|
||||||
client = clnt_create(master, YPPASSWDPROG, YPPASSWDVERS, "udp");
|
client = clnt_create(master, YPPASSWDPROG, YPPASSWDVERS, "udp");
|
||||||
if (client == NULL) {
|
if (client == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user