krebs.setuid: add option "envp"
This commit is contained in:
parent
0f7e6ee7f9
commit
c1c645b545
|
@ -20,6 +20,10 @@ let
|
||||||
type = types.filename;
|
type = types.filename;
|
||||||
default = config._module.args.name;
|
default = config._module.args.name;
|
||||||
};
|
};
|
||||||
|
envp = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
filename = mkOption {
|
filename = mkOption {
|
||||||
type = mkOptionType {
|
type = mkOptionType {
|
||||||
# TODO unyuck string and merge with toC
|
# TODO unyuck string and merge with toC
|
||||||
|
@ -57,7 +61,7 @@ let
|
||||||
};
|
};
|
||||||
config.activate = let
|
config.activate = let
|
||||||
src = pkgs.execve config.name {
|
src = pkgs.execve config.name {
|
||||||
inherit (config) filename;
|
inherit (config) envp filename;
|
||||||
};
|
};
|
||||||
dst = "${wrapperDir}/${config.name}";
|
dst = "${wrapperDir}/${config.name}";
|
||||||
in ''
|
in ''
|
||||||
|
|
Loading…
Reference in a new issue