diff options
author | 2013-03-20 15:23:37 +0000 | |
---|---|---|
committer | 2013-03-20 15:23:37 +0000 | |
commit | e6cc7a5e8da8beb1f7d5e0699126924deb4da875 (patch) | |
tree | dee35e36c61cc6d700627026eac1b263b3a8f5d4 /usr.bin/netstat/main.c | |
parent | No need to depend on MCLBYTES here. (diff) | |
download | wireguard-openbsd-e6cc7a5e8da8beb1f7d5e0699126924deb4da875.tar.xz wireguard-openbsd-e6cc7a5e8da8beb1f7d5e0699126924deb4da875.zip |
As non-root, whenever netstat is about to print out a kernel pointer...
print 0x0 instead. Hides a lot stuff people don't need to see.
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r-- | usr.bin/netstat/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index b861fb702f6..88c0c694a64 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.94 2012/08/22 06:08:07 tedu Exp $ */ +/* $OpenBSD: main.c,v 1.95 2013/03/20 15:23:37 deraadt Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -142,6 +142,7 @@ static struct protox *name2protox(char *); static struct protox *knownname(char *); u_int gettable(const char *); +int hideroot; kvm_t *kvmd; @@ -162,6 +163,8 @@ main(int argc, char *argv[]) int Tflag = 0; int repeatcount = 0; + hideroot = getuid(); + af = AF_UNSPEC; tableid = getrtable(); |