summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/tinc/def.nix2
-rw-r--r--custom/uucp.nix6
-rw-r--r--hel.nix10
-rw-r--r--hel/recv-media.nix3
-rw-r--r--ymir.nix8
5 files changed, 15 insertions, 14 deletions
diff --git a/custom/tinc/def.nix b/custom/tinc/def.nix
index 58c5237c..a3bb00a0 100644
--- a/custom/tinc/def.nix
+++ b/custom/tinc/def.nix
@@ -18,7 +18,7 @@ in
18 18
19 networks = mkOption { 19 networks = mkOption {
20 default = { }; 20 default = { };
21 type = types.loaOf types.optionSet; 21 type = types.loaOf types.submodule;
22 description = '' 22 description = ''
23 Defines the tinc networks which will be started. 23 Defines the tinc networks which will be started.
24 Each network invokes a different daemon. 24 Each network invokes a different daemon.
diff --git a/custom/uucp.nix b/custom/uucp.nix
index c69d15c5..0b4b1306 100644
--- a/custom/uucp.nix
+++ b/custom/uucp.nix
@@ -237,7 +237,7 @@ in {
237 choices as appropriate. */ 237 choices as appropriate. */
238 #if 1 238 #if 1
239 -#define MAIL_PROGRAM "/usr/lib/sendmail -t" 239 -#define MAIL_PROGRAM "/usr/lib/sendmail -t"
240 +#define MAIL_PROGRAM "/var/setuid-wrappers/sendmail -t" 240 +#define MAIL_PROGRAM "${config.security.wrapperDir}/sendmail -t"
241 /* #define MAIL_PROGRAM "/usr/sbin/sendmail -t" */ 241 /* #define MAIL_PROGRAM "/usr/sbin/sendmail -t" */
242 #define MAIL_PROGRAM_TO_BODY 1 242 #define MAIL_PROGRAM_TO_BODY 1
243 #define MAIL_PROGRAM_SUBJECT_BODY 1 243 #define MAIL_PROGRAM_SUBJECT_BODY 1
@@ -256,7 +256,7 @@ in {
256 *) from="$from@$relay";; 256 *) from="$from@$relay";;
257 esac 257 esac
258 258
259 exec /var/setuid-wrappers/sendmail -G -i -f "$from" -- "$@" 259 exec ${config.security.wrapperDir}/sendmail -G -i -f "$from" -- "$@"
260 ''; 260 '';
261 }; 261 };
262 262
@@ -264,6 +264,6 @@ in {
264 uucp 264 uucp
265 ]; 265 ];
266 266
267 services.cron.systemCronJobs = (map (name: "${config.services.uucp.interval} /var/setuid-wrappers/uucico -D -S ${name}") (if (config.services.uucp.interval != null) then config.services.uucp.remoteNodes else [])); 267 services.cron.systemCronJobs = (map (name: "${config.services.uucp.interval} ${config.security.wrapperDir}/uucico -D -S ${name}") (if (config.services.uucp.interval != null) then config.services.uucp.remoteNodes else []));
268 }; 268 };
269} 269}
diff --git a/hel.nix b/hel.nix
index 4e528bba..a7b34fe4 100644
--- a/hel.nix
+++ b/hel.nix
@@ -176,8 +176,8 @@
176 nodeName = "hel"; 176 nodeName = "hel";
177 remoteNodes = ["isaac" "ymir"]; # legacy name for odin 177 remoteNodes = ["isaac" "ymir"]; # legacy name for odin
178 sshUser = { 178 sshUser = {
179 openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFH1QWdgoC03nzW5GBuCl2pqASHeIXIYtE9IInHdaKcO uucp@ymir'' 179 openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFH1QWdgoC03nzW5GBuCl2pqASHeIXIYtE9IInHdaKcO uucp@ymir''
180 ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="${pkgs.writeScript "odin.sh" "#!${pkgs.stdenv.shell}\necho .\nexec -a uucico /var/setuid-wrappers/uucico\n"}" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJhACtnt9+3j2ev4QVA2QBlPtblPnu7yol2njgfMlHtC uucp@odin'' 180 ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="${pkgs.writeScript "odin.sh" "#!${pkgs.stdenv.shell}\necho .\nexec -a uucico ${config.security.wrapperDir}/uucico\n"}" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJhACtnt9+3j2ev4QVA2QBlPtblPnu7yol2njgfMlHtC uucp@odin''
181 ]; 181 ];
182 }; 182 };
183 sshConfig = '' 183 sshConfig = ''
@@ -188,7 +188,7 @@
188 Hostname ymir.niflheim.yggdrasil 188 Hostname ymir.niflheim.yggdrasil
189 IdentityFile ~/.ssh/ymir 189 IdentityFile ~/.ssh/ymir
190 ''; 190 '';
191 commandPath = [ "${pkgs.callPackage ./hel/recv-media.nix {}}/bin" "/var/setuid-wrappers/" ]; 191 commandPath = [ "${pkgs.callPackage ./hel/recv-media.nix {}}/bin" config.security.wrapperDir ];
192 defaultCommands = []; 192 defaultCommands = [];
193 commands = { 193 commands = {
194 "isaac" = ["recv-media" "notify-gkleen"]; 194 "isaac" = ["recv-media" "notify-gkleen"];
@@ -209,7 +209,7 @@
209 relayHost = "uucp:ymir"; 209 relayHost = "uucp:ymir";
210 recipientDelimiter = "+"; 210 recipientDelimiter = "+";
211 extraMasterConf = '' 211 extraMasterConf = ''
212 uucp unix - n n - - pipe flags=Fqhu user=uucp argv=/var/setuid-wrappers/uux -z -a $sender - $nexthop!rmail ($recipient) 212 uucp unix - n n - - pipe flags=Fqhu user=uucp argv=${config.security.wrapperDir}/uux -z -a $sender - $nexthop!rmail ($recipient)
213 sshsendmail unix - n n - - pipe flags=Fq user=postfix_ssh argv=${pkgs.openssh}/bin/ssh -F /var/db/postfix_ssh/ssh.config $nexthop sendmail -f $sender -G $recipient 213 sshsendmail unix - n n - - pipe flags=Fq user=postfix_ssh argv=${pkgs.openssh}/bin/ssh -F /var/db/postfix_ssh/ssh.config $nexthop sendmail -f $sender -G $recipient
214 ''; 214 '';
215 transport = '' 215 transport = ''
@@ -361,7 +361,7 @@
361 setgid = true; 361 setgid = true;
362 setuid = true; 362 setuid = true;
363 permissions = "u+rx,g+x,o+x"; 363 permissions = "u+rx,g+x,o+x";
364 source = ''${pkgs.callPackage ./custom/notify-user.nix { inherit (pkgs.haskellPackages) ghcWithPackages; }}/bin/notify-gkleen''; 364 source = ''${pkgs.callPackage ./custom/notify-user.nix { inherit (pkgs.haskellPackages) ghcWithPackages; inherit (config.security) wrapperDir}}/bin/notify-gkleen'';
365 }; 365 };
366 }; 366 };
367 367
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index 52d5bae6..a074e76b 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -6,6 +6,7 @@
6, showTitle ? true 6, showTitle ? true
7, ffmpeg ? null 7, ffmpeg ? null
8, gnused ? null 8, gnused ? null
9, wrapperDir ? "/run/wrappers/bin"
9}: 10}:
10 11
11assert showTitle -> ffmpeg != null && gnused != null && notifyUser != null; 12assert showTitle -> ffmpeg != null && gnused != null && notifyUser != null;
@@ -15,7 +16,7 @@ writeScriptBin "recv-media" ''
15 16
16 pid=$? 17 pid=$?
17 18
18 PATH=${eject}/bin:${coreutils}/bin:${if showTitle then ''${ffmpeg}/bin:${gnused}/bin:'' else ""}/var/setuid-wrappers 19 PATH=${eject}/bin:${coreutils}/bin:${if showTitle then ''${ffmpeg}/bin:${gnused}/bin:'' else ""}${wrapperDir}
19 20
20 exec 1> >(logger --id=$pid -t recv-media -p user.notice) 21 exec 1> >(logger --id=$pid -t recv-media -p user.notice)
21 exec 2> >(logger --id=$pid -t recv-media -p user.error) 22 exec 2> >(logger --id=$pid -t recv-media -p user.error)
diff --git a/ymir.nix b/ymir.nix
index a6967749..5dfa265e 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -500,7 +500,7 @@ in rec {
500 recipient_canonical_classes= envelope_recipient,header_recipient 500 recipient_canonical_classes= envelope_recipient,header_recipient
501 ''; 501 '';
502 extraMasterConf = '' 502 extraMasterConf = ''
503 uucp unix - n n - - pipe flags=Fqhu user=uucp argv=/var/setuid-wrappers/uux -z -a $sender - $nexthop!rmail ($recipient) 503 uucp unix - n n - - pipe flags=Fqhu user=uucp argv=${config.security.wrapperDir}/uux -z -a $sender - $nexthop!rmail ($recipient)
504 mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L /var/spool/lists/''${user} 504 mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L /var/spool/lists/''${user}
505 mlmmj-subs unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj-exposed}/bin/mlmmj-exposed /var/spool/lists/''${user} ''${extension} 505 mlmmj-subs unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj-exposed}/bin/mlmmj-exposed /var/spool/lists/''${user} ''${extension}
506 policy-spf unix - n n - - spawn user=nobody argv=${pkgs.pythonPackages.pypolicyd-spf}/bin/policyd-spf ${./ymir/spf.conf} 506 policy-spf unix - n n - - spawn user=nobody argv=${pkgs.pythonPackages.pypolicyd-spf}/bin/policyd-spf ${./ymir/spf.conf}
@@ -551,7 +551,7 @@ in rec {
551 selector = "ymir"; 551 selector = "ymir";
552 configFile = builtins.toFile "opendkim.conf" '' 552 configFile = builtins.toFile "opendkim.conf" ''
553 Syslog true 553 Syslog true
554 MTACommand /var/setuid-wrappers/sendmail 554 MTACommand ${config.security.wrapperDir}/sendmail
555 LogResults true 555 LogResults true
556 ''; 556 '';
557 }; 557 };
@@ -692,8 +692,8 @@ in rec {
692 nodeName = "ymir"; 692 nodeName = "ymir";
693 remoteNodes = ["isaac" "hel"]; # legacy name for odin 693 remoteNodes = ["isaac" "hel"]; # legacy name for odin
694 sshUser = { 694 sshUser = {
695 openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin'' 695 openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin''
696 ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOWBybBQKbPucqBgULQ1phv7IKFWl1Xc4drkCx3D5mIz uucp@hel'' 696 ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="${config.security.wrapperDir}/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOWBybBQKbPucqBgULQ1phv7IKFWl1Xc4drkCx3D5mIz uucp@hel''
697 ]; 697 ];
698 }; 698 };
699 sshConfig = '' 699 sshConfig = ''