diff --git a/tcpdump.c b/tcpdump.c index 7a8f4613..c2f681b8 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -2036,8 +2036,13 @@ main(int argc, char **argv) /* Run with '-Z root' to restore old behaviour */ if (!username) username = WITH_USER; - else if (strcmp(username, "root") == 0) + else if (strcmp(username, "root") == 0) { username = NULL; + if (chroot_dir) { + warning("chroot to %s disabled", chroot_dir); + chroot_dir = NULL; + } + } } #endif