summaryrefslogtreecommitdiffstats
path: root/debian/patches/drop-privs-silently.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:41:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:41:35 +0000
commit9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4 (patch)
tree7611716063eca933355f485079046f3cb2141e0c /debian/patches/drop-privs-silently.diff
parentAdding upstream version 4.99.3. (diff)
downloadtcpdump-9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4.tar.xz
tcpdump-9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4.zip
Adding debian version 4.99.3-1.debian/4.99.3-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/drop-privs-silently.diff')
-rw-r--r--debian/patches/drop-privs-silently.diff29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/drop-privs-silently.diff b/debian/patches/drop-privs-silently.diff
new file mode 100644
index 0000000..37c5e20
--- /dev/null
+++ b/debian/patches/drop-privs-silently.diff
@@ -0,0 +1,29 @@
+Description: Drop root privileges silently as it's the default
+Forwarded: no
+Bug-Debian: https://bugs.debian.org/935112
+Origin: vendor, https://src.fedoraproject.org/rpms/tcpdump/raw/master/f/0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
+---
+ tcpdump.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/tcpdump.c
++++ b/tcpdump.c
+@@ -788,8 +788,6 @@
+ int ret = capng_change_id(pw->pw_uid, pw->pw_gid, CAPNG_NO_FLAG);
+ if (ret < 0)
+ error("capng_change_id(): return %d\n", ret);
+- else
+- fprintf(stderr, "dropped privs to %s\n", username);
+ }
+ #else
+ if (initgroups(pw->pw_name, pw->pw_gid) != 0 ||
+@@ -799,9 +797,6 @@
+ (unsigned long)pw->pw_uid,
+ (unsigned long)pw->pw_gid,
+ pcap_strerror(errno));
+- else {
+- fprintf(stderr, "dropped privs to %s\n", username);
+- }
+ #endif /* HAVE_LIBCAP_NG */
+ } else
+ error("Couldn't find user '%.32s'", username);