Derp, correctly write the source program's path

This commit is contained in:
Parnell Springmeyer 2017-02-13 18:28:13 -06:00
parent cca2e11556
commit a27f35993d
No known key found for this signature in database
GPG Key ID: DCCF89258EAD874A

View File

@ -27,7 +27,7 @@ let
mkSetcapProgram = mkSetcapProgram =
{ program { program
, capabilities , capabilities
, source ? null , source
, owner ? "nobody" , owner ? "nobody"
, group ? "nogroup" , group ? "nogroup"
, ... , ...
@ -35,7 +35,7 @@ let
assert (lib.versionAtLeast (lib.getVersion config.boot.kernelPackages.kernel) "4.3"); assert (lib.versionAtLeast (lib.getVersion config.boot.kernelPackages.kernel) "4.3");
'' ''
cp ${securityWrapper}/bin/security-wrapper $wrapperDir/${program} cp ${securityWrapper}/bin/security-wrapper $wrapperDir/${program}
echo -n "$source" > $wrapperDir/${program}.real echo -n "${source}" > $wrapperDir/${program}.real
# Prevent races # Prevent races
chmod 0000 $wrapperDir/${program} chmod 0000 $wrapperDir/${program}
@ -53,7 +53,7 @@ let
###### Activation script for the setuid wrappers ###### Activation script for the setuid wrappers
mkSetuidProgram = mkSetuidProgram =
{ program { program
, source ? null , source
, owner ? "nobody" , owner ? "nobody"
, group ? "nogroup" , group ? "nogroup"
, setuid ? false , setuid ? false
@ -63,7 +63,7 @@ let
}: }:
'' ''
cp ${securityWrapper}/bin/security-wrapper $wrapperDir/${program} cp ${securityWrapper}/bin/security-wrapper $wrapperDir/${program}
echo -n "$source" > $wrapperDir/${program}.real echo -n "${source}" > $wrapperDir/${program}.real
# Prevent races # Prevent races
chmod 0000 $wrapperDir/${program} chmod 0000 $wrapperDir/${program}