From: Ben Pfaff Date: Thu, 16 Oct 2008 20:48:09 +0000 (-0700) Subject: Hardcode path to tcpdump as /usr/sbin/tcpdump. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40a6fb4e18256fa778fb036dcacf2d7479ba6529;p=openvswitch Hardcode path to tcpdump as /usr/sbin/tcpdump. Otherwise it won't be found when run as non-root because such users typically don't have /usr/sbin in $PATH. (We use tcpdump in a fashion that doesn't require root privilege.) --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index fab43e28..25988b22 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -126,7 +126,7 @@ ofp_packet_to_string(const void *data, size_t len, size_t total_len) } rewind(pcap); - snprintf(command, sizeof command, "tcpdump -e -n -r /dev/fd/%d 2>/dev/null", + snprintf(command, sizeof command, "/usr/sbin/tcpdump -e -n -r /dev/fd/%d 2>/dev/null", fileno(pcap)); tcpdump = popen(command, "r"); fclose(pcap);