NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/50248: tcpdump -w don't work.
>Number: 50248
>Category: bin
>Synopsis: tcpdump -w don't work.
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 15 08:30:00 +0000 2015
>Originator: NONAKA Kimihiro
>Release: HEAD 20150915
>Organization:
>Environment:
NetBSD netbsd 7.99.21 NetBSD 7.99.21 (KOHARU) #41: Tue Sep 15 12:08:42 JST 2015 nonaka@netbsd:/home/snapshot/NetBSD/HEAD.20150827/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/KOHARU amd64
>Description:
# tcpdump -w xxx.pcap
tcpdump: xxx.pcap: Permission denied
# tcpdump -w ~/xxx.pcap
tcpdump: /home/nonaka/xxx.pcap: No such file or directory
Failed to open the xxx.pcap file because try it after chroot(2).
>How-To-Repeat:
tcpdump -w xxx.pcap
>Fix:
Re-apply src/external/bsd/tcpdump/dist/tcpdump.c rev.1.8.
diff --git a/external/bsd/tcpdump/dist/tcpdump.c b/external/bsd/tcpdump/dist/tcpdump.c
index 2555495..009f294 100644
--- a/external/bsd/tcpdump/dist/tcpdump.c
+++ b/external/bsd/tcpdump/dist/tcpdump.c
@@ -1857,6 +1857,9 @@ main(int argc, char **argv)
capng_apply(CAPNG_SELECT_BOTH);
#endif /* HAVE_LIBCAP_NG */
if (username || chroot_dir)
+#ifndef HAVE_LIBCAP_NG
+ if (!WFileName)
+#endif
droproot(username, chroot_dir);
}
#endif /* WIN32 */
Home |
Main Index |
Thread Index |
Old Index