summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2005-03-02 21:45:53 +0000
committerotto <otto@openbsd.org>2005-03-02 21:45:53 +0000
commit85308c325d85a0dd13cbb20724c493a659d9a9ad (patch)
tree1a9064f6e935f685d3e90ff9fb01312f6faf8bfd
parentSpaces. (diff)
downloadwireguard-openbsd-85308c325d85a0dd13cbb20724c493a659d9a9ad.tar.xz
wireguard-openbsd-85308c325d85a0dd13cbb20724c493a659d9a9ad.zip
Report non-existing user or groupname correctly. From David Brownlee
<abs@netbsd>. ok millert@
-rw-r--r--usr.bin/pkill/pkill.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c
index cba7705f9c0..dc0611ff7b7 100644
--- a/usr.bin/pkill/pkill.c
+++ b/usr.bin/pkill/pkill.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkill.c,v 1.8 2005/02/11 17:17:45 millert Exp $ */
+/* $OpenBSD: pkill.c,v 1.9 2005/03/02 21:45:53 otto Exp $ */
/* $NetBSD: pkill.c,v 1.5 2002/10/27 11:49:34 kleink Exp $ */
/*-
@@ -38,7 +38,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: pkill.c,v 1.8 2005/02/11 17:17:45 millert Exp $";
+static const char rcsid[] = "$OpenBSD: pkill.c,v 1.9 2005/03/02 21:45:53 otto Exp $";
#endif /* !lint */
#include <sys/types.h>
@@ -504,14 +504,12 @@ makelist(struct listhead *head, enum listtype type, char *src)
switch (type) {
case LT_USER:
if ((pw = getpwnam(sp)) == NULL)
- errx(STATUS_BADUSAGE, "unknown user `%s'",
- optarg);
+ errx(STATUS_BADUSAGE, "unknown user `%s'", sp);
li->li_number = pw->pw_uid;
break;
case LT_GROUP:
if ((gr = getgrnam(sp)) == NULL)
- errx(STATUS_BADUSAGE, "unknown group `%s'",
- optarg);
+ errx(STATUS_BADUSAGE, "unknown group `%s'", sp);
li->li_number = gr->gr_gid;
break;
case LT_TTY: