mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
setcap-wrapper: Minor refactor
This commit is contained in:
parent
3fe7b1a4c9
commit
2f113ee90a
@ -12,7 +12,7 @@ let
|
||||
fi
|
||||
|
||||
gcc -Wall -O2 -DSOURCE_PROG=\"$source\" -DWRAPPER_DIR=\"${config.security.wrapperDir}\" \
|
||||
-lcap-ng -lcap ${./permissions-wrapper.c} -o $out/bin/${program}.wrapper -L ${pkgs.libcap.lib}/lib -L ${pkgs.libcap_ng}/lib \
|
||||
-lcap-ng -lcap ${./wrapper.c} -o $out/bin/${program}.wrapper -L ${pkgs.libcap.lib}/lib -L ${pkgs.libcap_ng}/lib \
|
||||
-I ${pkgs.libcap.dev}/include -I ${pkgs.libcap_ng}/include -I ${pkgs.linuxHeaders}/include
|
||||
'';
|
||||
|
||||
|
@ -4,7 +4,7 @@ Date: Thu, 26 Nov 2015 21:03:35 +0100
|
||||
Subject: [PATCH] Lookup dumpcap in PATH
|
||||
|
||||
NixOS patch: Look for dumpcap in PATH first, because there may be a
|
||||
dumpcap permissions-wrapper that we want to use instead of the default
|
||||
dumpcap wrapper that we want to use instead of the default
|
||||
non-setuid dumpcap binary.
|
||||
|
||||
Also change execv() to execvp() because we've set argv[0] to "dumpcap"
|
||||
@ -27,7 +27,7 @@ index 970688e..49914d5 100644
|
||||
- exename = g_strdup_printf("%s/dumpcap", progfile_dir);
|
||||
+ /*
|
||||
+ * NixOS patch: Look for dumpcap in PATH first, because there may be a
|
||||
+ * dumpcap permissions-wrapper that we want to use instead of the default
|
||||
+ * dumpcap wrapper that we want to use instead of the default
|
||||
+ * non-setuid dumpcap binary.
|
||||
+ */
|
||||
+ if (system("command -v dumpcap >/dev/null") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user