NixOS/nixpkgs — pull request #2237 by bjornfor (2014-04-13 15:24:17+00:00)
Title: wireshark: add patch to lookup "dumpcap" in PATH

What this allows us to do is define a "dumpcap" setuid wrapper in NixOS
and have wireshark use that instead of the non-setuid dumpcap binary
that it normally uses.

With the following config, only "root" and users in the "wireshark"
group will have access to capturing network traffic with
wireshark/dumpcap:

environment.systemPackages = [ pkgs.wireshark ];
security.setuidOwners = [
{ program = "dumpcap";
owner = "root";
group = "wireshark";
setuid = true;
setgid = false;
permissions = "u+rx,g+x";
}
];
users.extraGroups.wireshark.gid = 500;

(This wouldn't have worked before, because wireshark would not use our
setuid dumpcap binary.)