summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/traceroute/traceroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index 9c8a1ce8e6a..cd02cd9afa0 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.156 2018/10/15 11:31:11 florian Exp $ */
+/* $OpenBSD: traceroute.c,v 1.157 2018/10/20 19:55:01 kn Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*
@@ -359,7 +359,7 @@ main(int argc, char *argv[])
/* revoke privs */
ouid = getuid();
- if ((pw = getpwnam(TRACEROUTE_USER)) != NULL) {
+ if (ouid == 0 && (pw = getpwnam(TRACEROUTE_USER)) != NULL) {
uid = pw->pw_uid;
gid = pw->pw_gid;
} else {