summaryrefslogtreecommitdiff
path: root/usr.bin/id
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-07-23 19:24:34 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-07-23 19:24:34 +0000
commitccb80912d4bebc874cc8cac1b19bce07b1b557dc (patch)
tree00ae1dd8f7472935a2dcd380d59598ad7f4a5d63 /usr.bin/id
parentbe566d17674915eb7b671d110919eb148dffa24a (diff)
- Missing newline when euid != ruid; from FreeBSD
- Also, sync the usage() to the man page (add -p syntax).
Diffstat (limited to 'usr.bin/id')
-rw-r--r--usr.bin/id/id.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index 072adc40c27..bb63e7eff5d 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: id.c,v 1.6 1997/07/25 21:33:39 mickey Exp $ */
+/* $OpenBSD: id.c,v 1.7 1999/07/23 19:24:33 aaron Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)id.c 8.3 (Berkeley) 4/28/95";*/
-static char rcsid[] = "$OpenBSD: id.c,v 1.6 1997/07/25 21:33:39 mickey Exp $";
+static char rcsid[] = "$OpenBSD: id.c,v 1.7 1999/07/23 19:24:33 aaron Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -174,9 +174,9 @@ pretty(pw)
if ((eid = geteuid()) != rid)
if ((pw = getpwuid(eid)))
- (void)printf("euid\t%s", pw->pw_name);
+ (void)printf("euid\t%s\n", pw->pw_name);
else
- (void)printf("euid\t%u", eid);
+ (void)printf("euid\t%u\n", eid);
if ((rid = getgid()) != (eid = getegid()))
if ((gr = getgrgid(rid)))
(void)printf("rgid\t%s\n", gr->gr_name);
@@ -321,6 +321,7 @@ usage()
(void)fprintf(stderr, "usage: id [user]\n"
" id -G [-n] [user]\n"
" id -g [-nr] [user]\n"
+ " id -p\n"
" id -u [-nr] [user]\n");
exit(1);
}