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.)
}
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);