about summary refs log tree commit diff
path: root/nixpkgs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-08 00:25:04 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-16 22:10:15 +0000
commitc4b560df78424a151dfe4bab886dbdb82eab9c79 (patch)
treecc11b198d1ef2fe401cfe8cbb92730c14093a5ad /nixpkgs
parent790500b595b753de2d2be21ffc69387a06210f7f (diff)
downloadnixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar.gz
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar.bz2
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar.lz
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar.xz
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.tar.zst
nixlib-c4b560df78424a151dfe4bab886dbdb82eab9c79.zip
nixos/sshd: add strictModes option
Diffstat (limited to 'nixpkgs')
-rw-r--r--nixpkgs/nixos/modules/services/networking/ssh/sshd.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix b/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
index 91fc7d72bc6d..c7607dac4298 100644
--- a/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
@@ -334,6 +334,13 @@ in
         '';
       };
 
+      strictModes = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Whether sshd should check file modes and ownership of directories
+        '';
+      };
     };
 
     users.users = mkOption {
@@ -498,6 +505,8 @@ in
           UseDNS no
         ''}
 
+        StrictModes ${if cfg.strictModes then "yes" else "no"}
+
       '';
 
     assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;