]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Skip privilege dropping when using -Z root on --with-user builds
[tcpdump] / tcpdump.c
index 0b6541589f018fd61121bcb66a9fd6262d44346d..837f14e9e52d36fd36730f5dbcc76c7dd2b4d1ce 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -2026,6 +2026,8 @@ main(int argc, char **argv)
                /* Run with '-Z root' to restore old behaviour */
                if (!username)
                        username = WITH_USER;
                /* Run with '-Z root' to restore old behaviour */
                if (!username)
                        username = WITH_USER;
+               else if (strcmp(username, "root") == 0)
+                       username = NULL;
        }
 #endif
 
        }
 #endif