Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/tcpdump/dist PR/50248: re-apply src/external/bs...
details: https://anonhg.NetBSD.org/src/rev/e2ecf0e894ec
branches: trunk
changeset: 340606:e2ecf0e894ec
user: nonaka <nonaka%NetBSD.org@localhost>
date: Thu Sep 17 14:03:10 2015 +0000
description:
PR/50248: re-apply src/external/bsd/tcpdump/dist/tcpdump.c rev.1.8.
> When running as root and wanting to write a file and not having CAPNG, don't
> drop privs, because we cannot open the file if we drop privs.
diffstat:
external/bsd/tcpdump/dist/tcpdump.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 3ba4533853da -r e2ecf0e894ec external/bsd/tcpdump/dist/tcpdump.c
--- a/external/bsd/tcpdump/dist/tcpdump.c Thu Sep 17 09:34:20 2015 +0000
+++ b/external/bsd/tcpdump/dist/tcpdump.c Thu Sep 17 14:03:10 2015 +0000
@@ -30,7 +30,7 @@
static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
-__RCSID("$NetBSD: tcpdump.c,v 1.11 2015/03/31 21:59:35 christos Exp $");
+__RCSID("$NetBSD: tcpdump.c,v 1.12 2015/09/17 14:03:10 nonaka Exp $");
#endif
/*
@@ -1856,8 +1856,12 @@
}
capng_apply(CAPNG_SELECT_BOTH);
#endif /* HAVE_LIBCAP_NG */
- if (username || chroot_dir)
+ if (username || chroot_dir) {
+#ifndef HAVE_LIBCAP_NG
+ if (!WFileName)
+#endif
droproot(username, chroot_dir);
+ }
}
#endif /* WIN32 */
Home |
Main Index |
Thread Index |
Old Index