@ -33,33 +33,18 @@ let
} ;
options . owner = lib . mkOption
{ type = lib . types . str ;
default = with config ;
if ( capabilities != " " ) || ! ( setuid || setgid || permissions != null )
then " r o o t "
else " n o b o d y " ;
description = ''
The owner of the wrapper program . Defaults to <literal> root < /literal >
if any capability is set and setuid/setgid/permissions are not , otherwise to
<literal> nobody < /litera > .
'' ;
default = " r o o t " ;
description = " T h e o w n e r o f t h e w r a p p e r p r o g r a m . " ;
} ;
options . group = lib . mkOption
{ type = lib . types . str ;
default = with config ;
if ( capabilities != " " ) || ! ( setuid || setgid || permissions != null )
then " r o o t "
else " n o g r o u p " ;
description = ''
The group of the wrapper program . Defaults to <literal> root < /literal >
if any capability is set and setuid/setgid/permissions are not ,
otherwise to <literal> nogroup < /litera > .
'' ;
default = " r o o t " ;
description = " T h e g r o u p o f t h e w r a p p e r p r o g r a m . " ;
} ;
options . permissions = lib . mkOption
{ type = lib . types . nullOr fileModeType ;
default = null ;
example = " u + r x , g + x , o + x " ;
apply = x : if x == null then " u + r x , g + x , o + x " else x ;
{ type = fileModeType ;
default = " u + r x , g + x , o + x " ;
example = " a + r x " ;
description = ''
The permissions of the wrapper program . The format is that of a
symbolic or numeric file mode understood by <command> chmod < /command > .
@ -89,7 +74,7 @@ let
} ;
options . setuid = lib . mkOption
{ type = lib . types . bool ;
default = fals e;
default = tru e;
description = " W h e t h e r t o a d d t h e s e t u i d b i t t h e w r a p p e r p r o g r a m . " ;
} ;
options . setgid = lib . mkOption
@ -153,8 +138,8 @@ let
builtins . map
( opts :
if opts . capabilities != " "
then mkSetcapProgram opts
else mkSetuidProgram opts
then mkSetcapProgram opts
else mkSetuidProgram opts
) ( lib . attrValues wrappers ) ;
in
{