nixpkgs/nixos/modules
emilylange 08c37ba899 nixos/lldap: set service UMask=0027 and StateDirectoryMode=0750
While `/var/lib/lldap` isn't technically accessible by unprivileged
users thanks to `DynamicUser=true`, a user might prefer and change it to
`DynamicUser=false`.

There is currently also a PR open that intends to make `DynamicUser`
configurable via module option.

As such, `jwt_secret_file`, if bootstrapped by the service start
procedure, might be rendered world-readable due to its permissions
(`0644/-rw-r--r--`) defaulting to the service's umask (`022`) and
`/var/lib/lldap` to `0755/drwxr-xr-x` due to `StateDirectoryMode=0755`.

This would usually be fixed by using `(umask 027; openssl ...)` instead
of just `openssl ...`.

However, it was found that another file (`users.db`), this time
bootstrapped by `lldap` itself, also had insufficient permissions
(`0644/-rw-r--r--`) inherited by the global umask and would be left
world-readable as well.

Due to this, we instead change the service's to `027`.

And to lower the impact for already bootstrapped files on existing
instances like `users.db`, set `StateDirectoryMode=0750`.
2024-03-11 17:34:29 +01:00
..
config Merge pull request #133542 from fpletz/refactor/pinentry-remove-multiple-outputs 2024-03-09 23:57:27 +01:00
hardware Merge pull request #291464 from Gerg-L/switcheroo2 2024-02-26 07:56:34 +01:00
i18n/input-method nixos/fcitx5: enable plasma6Support by default if plasma6 is enabled 2024-03-01 22:43:56 -05:00
image nixos/repart-image: add options to specify mkfs parameters 2024-03-07 22:50:56 +01:00
installer nixos/release: add Plasma 6 ISO variant 2024-02-28 18:49:33 +03:00
misc nixos/nixpkgs: fix determination for cross-compiled nixos system 2024-03-01 09:05:08 -08:00
profiles nixos/hardened: update hardened profile to new recommendations 2024-01-27 20:43:58 +00:00
programs nixos/clash-verge: add cfg.package 2024-03-10 20:16:41 +01:00
security Merge pull request #291951 from amarshall/zfs-pkgs-renaming 2024-03-01 10:09:12 -05:00
services nixos/lldap: set service UMask=0027 and StateDirectoryMode=0750 2024-03-11 17:34:29 +01:00
system Merge pull request #293720 from vkleen/fix/systemd-boot-random-seed 2024-03-09 21:01:35 -05:00
tasks Add missing closing parens. 2024-03-02 12:40:40 +01:00
testing nixos/test-instrumentation: use file to set root password 2024-01-18 23:08:13 +01:00
virtualisation Merge pull request #292552 from diogotcorreia/oci-containers-fix-stop-one-shot 2024-03-07 21:23:51 +01:00
module-list.nix Merge pull request #292873 from ghthor/tabby 2024-03-07 21:51:06 +00:00
rename.nix restya-board: drop 2024-02-07 01:33:05 +01:00