Don't try to start NPF if o.isr00t is false (in other words, the --unprivileged

option was used). This idea was from Michael Pattrick.
This commit is contained in:
david 2010-01-15 19:58:57 +00:00
parent df19889e22
commit ab3b1f409d

View file

@ -236,7 +236,11 @@ void win_init()
if(o.debugging)
printf("Winpcap present, dynamic linked to: %s\n", pcap_lib_version());
o.have_pcap = o.have_pcap && start_npf();
/* o.is00t will be false at this point if the used asked for
--unprivileged. In that case don't bother them with a
potential UAC dialog when starting NPF. */
if (o.isr00t)
o.have_pcap = o.have_pcap && start_npf();
}
#ifdef _MSC_VER
__except (1) {