From: guy Date: Thu, 10 Apr 2008 01:26:57 +0000 (+0000) Subject: Report PCAP_ERROR_PERM_DENIED if you don't have permission to open a X-Git-Tag: libpcap-1.0.0~91 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/99fbd52af23cecbf588420059a018433e779e5bb Report PCAP_ERROR_PERM_DENIED if you don't have permission to open a PF_PACKET socket. --- diff --git a/pcap-linux.c b/pcap-linux.c index ff30c939..6e50fd67 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -34,7 +34,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.16 2008-04-09 21:26:37 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.17 2008-04-10 01:26:57 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 */