From ab3b1f409d49576bf2dceb400161cc2062a38784 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 15 Jan 2010 19:58:57 +0000 Subject: [PATCH] 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. --- mswin32/winfix.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mswin32/winfix.cc b/mswin32/winfix.cc index 3d3cc17ba..46926bf6d 100644 --- a/mswin32/winfix.cc +++ b/mswin32/winfix.cc @@ -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) {