]> The Tcpdump Group git mirrors - libpcap/commitdiff
Report PCAP_ERROR_PERM_DENIED if you don't have permission to open a
authorguy <guy>
Thu, 10 Apr 2008 01:26:43 +0000 (01:26 +0000)
committerguy <guy>
Thu, 10 Apr 2008 01:26:43 +0000 (01:26 +0000)
PF_PACKET socket.

pcap-linux.c

index 0ef4edf32ff4224faa0bf17780533d9802329ae6..148f6ba858e9743120c8bef0f1d9117c93a40d09 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.145 2008-04-09 21:26:12 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.146 2008-04-10 01:26:43 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -2795,7 +2795,7 @@ activate_old(pcap_t *handle)
        if (handle->fd == -1) {
                snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
                         "socket: %s", pcap_strerror(errno));
-               return PCAP_ERROR;
+               return PCAP_ERROR_PERM_DENIED;
        }
 
        /* It worked - we are using the old interface */