summaryrefslogtreecommitdiff
path: root/usr.bin/pkill
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-03-02 21:45:54 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-03-02 21:45:54 +0000
commit2175bb9ea492abe9fb7fa36e74ac85f59205bd85 (patch)
tree7dca92d19f80ef7c1a2bdaed91404b2f34f7e820 /usr.bin/pkill
parentf8bb27ec9a920789a64293ad38939749f1e02a93 (diff)
Report non-existing user or groupname correctly. From David Brownlee
<abs@netbsd>. ok millert@
Diffstat (limited to 'usr.bin/pkill')
-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: