summaryrefslogtreecommitdiffstats
path: root/usr.bin/pkill
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/pkill')
-rw-r--r--usr.bin/pkill/Makefile3
-rw-r--r--usr.bin/pkill/pkill.c14
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();
/*
OpenPOWER on IntegriCloud