summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-30 20:03:54 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-30 20:03:54 +0000
commit2bbe6a6c71c22ee19f21c520324e6357d2eb9a02 (patch)
treece7975a7adb89513714ad3d266fa2e53019832b3
parentccaf1669dbdaa21265c2ccb41318aadcf63e12e5 (diff)
fix previous, admin may again set non-standard shell; ok millert@
-rw-r--r--usr.bin/chpass/field.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/chpass/field.c b/usr.bin/chpass/field.c
index 6078d7cbb23..f4146264bb3 100644
--- a/usr.bin/chpass/field.c
+++ b/usr.bin/chpass/field.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: field.c,v 1.10 2009/03/05 20:53:13 millert Exp $ */
+/* $OpenBSD: field.c,v 1.11 2009/04/30 20:03:53 jacekm Exp $ */
/* $NetBSD: field.c,v 1.3 1995/03/26 04:55:28 glass Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: field.c,v 1.10 2009/03/05 20:53:13 millert Exp $";
+static char rcsid[] = "$OpenBSD: field.c,v 1.11 2009/04/30 20:03:53 jacekm Exp $";
#endif
#endif /* not lint */
@@ -228,7 +228,8 @@ p_shell(char *p, struct passwd *pw, ENTRY *ep)
if (uid) {
warnx("%s: non-standard shell", p);
return (1);
- }
+ } else
+ t = strdup(p);
}
if (!(pw->pw_shell = t)) {
warnx("can't save entry");