Check sshd.permitRootLogin values.
svn path=/nixos/trunk/; revision=16769
This commit is contained in:
parent
8b229a45c3
commit
5980d130c9
|
@ -31,11 +31,11 @@ let
|
||||||
GatewayPorts ${cfg.gatewayPorts}
|
GatewayPorts ${cfg.gatewayPorts}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# !!! is this assertion evaluated anywhere???
|
permitRootLoginCheck = v:
|
||||||
assertion = cfg.permitRootLogin == "yes" ||
|
v == "yes" ||
|
||||||
cfg.permitRootLogin == "without-password" ||
|
v == "without-password" ||
|
||||||
cfg.permitRootLogin == "forced-commands-only" ||
|
v == "forced-commands-only" ||
|
||||||
cfg.permitRootLogin == "no";
|
v == "no";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ in
|
||||||
|
|
||||||
permitRootLogin = mkOption {
|
permitRootLogin = mkOption {
|
||||||
default = "yes";
|
default = "yes";
|
||||||
|
check = permitRootLoginCheck;
|
||||||
description = ''
|
description = ''
|
||||||
Whether the root user can login using ssh. Valid values are
|
Whether the root user can login using ssh. Valid values are
|
||||||
<literal>yes</literal>, <literal>without-password</literal>,
|
<literal>yes</literal>, <literal>without-password</literal>,
|
||||||
|
|
Loading…
Reference in New Issue