From 780db0477c304196a700894bdfd9a3096b5857fd Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Tue, 21 Oct 2014 13:37:24 +0200 Subject: [PATCH 8/8] Don't print out we dropped root, we are always dropping it. --- tcpdump.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tcpdump.c b/tcpdump.c index 9110ccf..8ce9102 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -726,9 +726,7 @@ droproot(const char *username, const char *chroot_dir) if (ret < 0) { fprintf(stderr, "error : ret %d\n", ret); } - else { - printf("dropped privs to %s\n", username); - } + /* We don't need CAP_SETUID and CAP_SETGID */ capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID); capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID); @@ -746,9 +744,7 @@ droproot(const char *username, const char *chroot_dir) pcap_strerror(errno)); exit(1); } - else { - printf("dropped privs to %s\n", username); - } + #endif /* HAVE_CAP_NG_H */ } else { -- 1.8.3.1