summary refs log tree commit diff
path: root/nixos/modules/services/scheduling
diff options
context:
space:
mode:
authorAlex Brandt <alunduil@gmail.com>2018-05-06 11:24:09 -0700
committerAlex Brandt <alunduil@gmail.com>2018-05-06 11:24:09 -0700
commitfdebbce7262d671ce3cd4020a7b4d8de1535a83c (patch)
tree17db4dc2deec0c978b300c56b411e34053297d04 /nixos/modules/services/scheduling
parent127de7480e8dfc6c29aae06eb4669bb08c41763e (diff)
downloadnixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar.gz
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar.bz2
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar.lz
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar.xz
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.tar.zst
nixpkgs-fdebbce7262d671ce3cd4020a7b4d8de1535a83c.zip
nixos/modules/services/scheduling/fcron: add setuid to fcrontab
Without fcrontab being setuid, every attempt by an user in the fcron
group to edit their own crontab (via `fcrontab -e`) results in the
following error:

```
2018-05-06 11:29:07 ERROR could not change euid to 273: Operation not permitted
2018-05-06 11:29:07 ERROR fcron child aborted: this does not affect the main fcron daemon, but this may prevent a job from being run or an email from being sent.
```

Adding setuid by hand has resolved this issue and aligns with the way
fcrontab is installed on other distributions.
Diffstat (limited to 'nixos/modules/services/scheduling')
-rw-r--r--nixos/modules/services/scheduling/fcron.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index e3b6b638f5a..0ea41f3c398 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -128,6 +128,7 @@ in
         owner = "fcron";
         group = "fcron";
         setgid = true;
+        setuid = true;
       };
       fcrondyn = {
         source = "${pkgs.fcron}/bin/fcrondyn";