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