summaryrefslogtreecommitdiff
path: root/bin/ps/ps.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-02-08 19:28:20 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-02-08 19:28:20 +0000
commit8bff61f053bd3fbeb67a639cab228d96101b7734 (patch)
tree447ea50e015e5902318949426a74e3a45c9df367 /bin/ps/ps.c
parent058e7500cdc8a58e7b2e65b683aae955963c6a35 (diff)
'ps' should not act like 'ps a'. Resolves PR 3676.
ok tdeval@ millert@
Diffstat (limited to 'bin/ps/ps.c')
-rw-r--r--bin/ps/ps.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index 6d00f87b309..63a96a7d237 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ps.c,v 1.36 2004/02/04 12:58:27 otto Exp $ */
+/* $OpenBSD: ps.c,v 1.37 2004/02/08 19:28:19 otto Exp $ */
/* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: ps.c,v 1.36 2004/02/04 12:58:27 otto Exp $";
+static char rcsid[] = "$OpenBSD: ps.c,v 1.37 2004/02/08 19:28:19 otto Exp $";
#endif
#endif /* not lint */
@@ -283,8 +283,10 @@ main(int argc, char *argv[])
parsefmt(dfmt);
/* XXX - should be cleaner */
- if (!all && ttydev == NODEV && pid == -1 && !Uflag)
+ if (!all && ttydev == NODEV && pid == -1 && !Uflag) {
uid = getuid();
+ Uflag = 1;
+ }
/*
* scan requested variables, noting what structures are needed,