diff options
author | ru <ru@FreeBSD.org> | 2004-11-13 17:12:22 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-11-13 17:12:22 +0000 |
commit | d5be7de9fe9092234af3430f20c4ca897c548e79 (patch) | |
tree | bebcbbc76fe090785f1ef711216bc351e8605824 /usr.bin | |
parent | aaa7e9e341bb1a0d6ec91e7b4e8a5d7ac5ecba01 (diff) | |
download | FreeBSD-src-d5be7de9fe9092234af3430f20c4ca897c548e79.zip FreeBSD-src-d5be7de9fe9092234af3430f20c4ca897c548e79.tar.gz |
Removed bitrot.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pkill/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/pkill/pkill.c | 14 |
2 files changed, 1 insertions, 16 deletions
diff --git a/usr.bin/pkill/Makefile b/usr.bin/pkill/Makefile index 758d3b0..632d6f4 100644 --- a/usr.bin/pkill/Makefile +++ b/usr.bin/pkill/Makefile @@ -7,9 +7,6 @@ WARNS?= 5 DPADD= ${LIBKVM} LDADD= -lkvm -#BINGRP= kmem -#BINMODE= 2555 - LINKS= ${BINDIR}/pkill ${BINDIR}/pgrep MLINKS= pkill.1 pgrep.1 diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index 3051f95..f49bc9e 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -124,7 +124,7 @@ main(int argc, char **argv) char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q; const char *execf, *coref; int debug_opt; - int i, ch, bestidx, rv, criteria, drop_privs; + int i, ch, bestidx, rv, criteria; size_t jsz; void (*action)(struct kinfo_proc *); struct kinfo_proc *kp; @@ -166,7 +166,6 @@ main(int argc, char **argv) criteria = 0; debug_opt = 0; - drop_privs = 0; execf = coref = _PATH_DEVNULL; while ((ch = getopt(argc, argv, "DG:M:N:P:U:d:fg:lns:t:u:vx")) != -1) @@ -180,11 +179,9 @@ main(int argc, char **argv) break; case 'M': coref = optarg; - drop_privs = 1; break; case 'N': execf = optarg; - drop_privs = 1; break; case 'P': makelist(&ppidlist, LT_GENERIC, optarg); @@ -245,15 +242,6 @@ main(int argc, char **argv) if (!criteria) usage(); - /* - * Discard privileges if not the running kernel so that bad - * guys can't print interesting stuff from kernel memory. - */ - if (drop_privs) { - setgid(getgid()); - setuid(getuid()); - } - mypid = getpid(); /* |