Skip to content

Commit

Permalink
Don't try to start NPF if o.isr00t is false (in other words, the --un…
Browse files Browse the repository at this point in the history
…privileged

option was used). This idea was from Michael Pattrick.
  • Loading branch information
david committed Jan 15, 2010
1 parent df19889 commit ab3b1f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mswin32/winfix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ab3b1f4

Please sign in to comment.