]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Fix for backends which doesn't support capsicum.
[tcpdump] / tcpdump.c
index b11fc60ff2ad9614c0bd032c358019f782996cbc..7cdbd8af4bc54622039710b475593d32db5fa05c 100644 (file)
--- 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 */