X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/a6e78f896b25cb7204e9f5739eab48add4dad559..705725c2475acfc5ee17c9bfdd96a64185959461:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index b11fc60f..7cdbd8af 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -2572,6 +2572,9 @@ DIAG_ON_ASSIGN_ENUM #else cansandbox = (cansandbox && ndo->ndo_nflag); #endif /* HAVE_CASPER */ + cansandbox = (cansandbox && (pcap_fileno(pd) != -1 || + RFileName != NULL)); + if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); #endif /* HAVE_CAPSICUM */