summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-11-13 17:12:22 +0000
committerru <ru@FreeBSD.org>2004-11-13 17:12:22 +0000
commitd5be7de9fe9092234af3430f20c4ca897c548e79 (patch)
treebebcbbc76fe090785f1ef711216bc351e8605824 /bin/ps
parentaaa7e9e341bb1a0d6ec91e7b4e8a5d7ac5ecba01 (diff)
downloadFreeBSD-src-d5be7de9fe9092234af3430f20c4ca897c548e79.zip
FreeBSD-src-d5be7de9fe9092234af3430f20c4ca897c548e79.tar.gz
Removed bitrot.
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/Makefile2
-rw-r--r--bin/ps/ps.c14
2 files changed, 2 insertions, 14 deletions
diff --git a/bin/ps/Makefile b/bin/ps/Makefile
index 82b5a60..5628436 100644
--- a/bin/ps/Makefile
+++ b/bin/ps/Makefile
@@ -13,7 +13,5 @@ WARNS?= 5
CFLAGS+=-DLAZY_PS
DPADD= ${LIBM} ${LIBKVM}
LDADD= -lm -lkvm
-#BINGRP= kmem
-#BINMODE=2555
.include <bsd.prog.mk>
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index bafbfa1..dcb7018 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -171,7 +171,7 @@ main(int argc, char *argv[])
struct winsize ws;
const char *nlistf, *memf;
char *cols;
- int all, ch, dropgid, elem, flag, _fmt, i, lineno;
+ int all, ch, elem, flag, _fmt, i, lineno;
int nentries, nkept, nselectors;
int prtheader, showthreads, wflag, what, xkeep, xkeep_implied;
char errbuf[_POSIX2_LINE_MAX];
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
if (argc > 1)
argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]);
- all = dropgid = _fmt = nselectors = optfatal = 0;
+ all = _fmt = nselectors = optfatal = 0;
prtheader = showthreads = wflag = xkeep_implied = 0;
xkeep = -1; /* Neither -x nor -X. */
init_list(&gidlist, addelem_gid, sizeof(gid_t), "group");
@@ -278,14 +278,12 @@ main(int argc, char *argv[])
break;
case 'M':
memf = optarg;
- dropgid = 1;
break;
case 'm':
sortby = SORTMEM;
break;
case 'N':
nlistf = optarg;
- dropgid = 1;
break;
case 'O':
parsefmt(o1, 1);
@@ -423,14 +421,6 @@ main(int argc, char *argv[])
if (xkeep < 0) /* Neither -X nor -x was specified. */
xkeep = xkeep_implied;
-
- /*
- * Discard setgid privileges if not the running kernel so that bad
- * guys can't print interesting stuff from kernel memory.
- */
- if (dropgid)
- setgid(getgid());
-
kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
if (kd == 0)
errx(1, "%s", errbuf);
OpenPOWER on IntegriCloud