2009-03-06 12:25:46 +00:00
|
|
|
{pkgs, config, ...}:
|
2009-05-20 16:43:31 +01:00
|
|
|
|
2009-03-06 12:25:46 +00:00
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mergeOneOption mkOption mkIf;
|
|
|
|
in
|
2009-05-20 16:43:31 +01:00
|
|
|
|
2009-03-06 12:25:46 +00:00
|
|
|
{
|
2009-05-20 16:43:31 +01:00
|
|
|
security = {
|
|
|
|
setuidPrograms = mkOption {
|
|
|
|
default = [
|
|
|
|
"passwd" "su" "crontab" "ping" "ping6"
|
|
|
|
"fusermount" "wodim" "cdrdao" "growisofs"
|
|
|
|
];
|
|
|
|
description = "
|
|
|
|
Only the programs from system path listed her will be made setuid root
|
|
|
|
(through a wrapper program). It's better to set
|
|
|
|
<option>security.extraSetuidPrograms</option>.
|
|
|
|
";
|
|
|
|
};
|
2009-03-06 12:25:46 +00:00
|
|
|
|
2009-05-20 16:43:31 +01:00
|
|
|
extraSetuidPrograms = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = ["fusermount"];
|
|
|
|
description = "
|
|
|
|
This option lists additional programs that must be made setuid
|
|
|
|
root.
|
|
|
|
";
|
|
|
|
};
|
2009-03-06 12:25:46 +00:00
|
|
|
|
2009-05-20 16:43:31 +01:00
|
|
|
setuidOwners = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = [{
|
|
|
|
program = "sendmail";
|
|
|
|
owner = "nodody";
|
|
|
|
group = "postdrop";
|
|
|
|
setuid = false;
|
|
|
|
setgid = true;
|
|
|
|
}];
|
|
|
|
description = ''
|
|
|
|
List of non-trivial setuid programs from system path, like Postfix sendmail. Default
|
|
|
|
should probably be nobody:nogroup:false:false - if you are bothering
|
|
|
|
doing anything with a setuid program, "root.root u+s g-s" is not what
|
|
|
|
you are aiming at..
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2009-03-06 12:25:46 +00:00
|
|
|
}
|