summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortim <tim@openbsd.org>2016-05-08 20:27:43 +0000
committertim <tim@openbsd.org>2016-05-08 20:27:43 +0000
commit0aa94ebeff57b9f48a65342c9ef7c4f08f6c3ce2 (patch)
tree18659d68f6fb001af9c0ef3de7159437b77fb985
parentThe "loop detected" message should not print the errno string. (diff)
downloadwireguard-openbsd-0aa94ebeff57b9f48a65342c9ef7c4f08f6c3ce2.tar.xz
wireguard-openbsd-0aa94ebeff57b9f48a65342c9ef7c4f08f6c3ce2.zip
Switch to getpwnam_shadow() now that getpwnam() no longer opens the shadow
database; OK deraadt@ sthen@
-rw-r--r--usr.bin/passwd/local_passwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c
index 2c9f4b69c58..91b49d23e78 100644
--- a/usr.bin/passwd/local_passwd.c
+++ b/usr.bin/passwd/local_passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: local_passwd.c,v 1.46 2015/11/26 19:01:47 deraadt Exp $ */
+/* $OpenBSD: local_passwd.c,v 1.47 2016/05/08 20:27:43 tim Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -65,7 +65,7 @@ local_passwd(char *uname, int authenticated)
int i, pfd, tfd = -1;
int pwflags = _PASSWORD_OMITV7;
- if (!(pw = getpwnam(uname))) {
+ if (!(pw = getpwnam_shadow(uname))) {
warnx("unknown user %s.", uname);
return(1);
}