diff options
author | 1997-03-27 00:30:52 +0000 | |
---|---|---|
committer | 1997-03-27 00:30:52 +0000 | |
commit | 98c2e2377bd644fc6a87dba031a846830a9d30ff (patch) | |
tree | e1ff66eaa260cf0f910cd9ea2a2ad70f6b501dd8 /usr.bin/passwd/local_passwd.c | |
parent | md5 stuff (diff) | |
download | wireguard-openbsd-98c2e2377bd644fc6a87dba031a846830a9d30ff.tar.xz wireguard-openbsd-98c2e2377bd644fc6a87dba031a846830a9d30ff.zip |
Slight cleanup, more needed
Diffstat (limited to 'usr.bin/passwd/local_passwd.c')
-rw-r--r-- | usr.bin/passwd/local_passwd.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index f54dc12ab6d..b8b50660feb 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.6 1997/02/16 20:08:56 provos Exp $ */ +/* $OpenBSD: local_passwd.c,v 1.7 1997/03/27 00:30:53 weingart Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,24 +35,25 @@ #ifndef lint /*static char sccsid[] = "from: @(#)local_passwd.c 5.5 (Berkeley) 5/6/91";*/ -static char rcsid[] = "$OpenBSD: local_passwd.c,v 1.6 1997/02/16 20:08:56 provos Exp $"; +static char rcsid[] = "$OpenBSD: local_passwd.c,v 1.7 1997/03/27 00:30:53 weingart Exp $"; #endif /* not lint */ #include <sys/types.h> #include <sys/stat.h> #include <pwd.h> +#include <err.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <unistd.h> +#include <ctype.h> #include <fcntl.h> #include <util.h> -uid_t uid; +static uid_t uid; -char *progname = "passwd"; -char *tempname; +int local_passwd(uname) char *uname; { @@ -65,13 +66,13 @@ local_passwd(uname) extern int use_yp; if (!use_yp) #endif - (void)fprintf(stderr, "passwd: unknown user %s.\n", uname); + warnx("unknown user %s.", uname); return(1); } uid = getuid(); if (uid && uid != pw->pw_uid) { - (void)fprintf(stderr, "passwd: %s\n", strerror(EACCES)); + warnx("login != uid: %s", strerror(EACCES)); return(1); } |