refactoring environment variables loading mechanism

This commit is contained in:
Patrick Schleizer 2023-10-12 10:40:27 -04:00
parent 358e4226f1
commit fa820e8978
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48
4 changed files with 10 additions and 9 deletions

2
debian/security-misc.links vendored Normal file
View File

@ -0,0 +1,2 @@
/etc/profile.d/security-misc.sh /etc/zprofile.d/security-misc.sh
/etc/profile.d/security-misc.sh /etc/X11/Xsession.d/security-misc.sh

View File

@ -40,3 +40,6 @@ rm_conffile /etc/security/limits.d/disable-coredumps.conf
## moved to separate package ram-wipe
rm_conffile /etc/default/grub.d/40_cold_boot_attack_defense.cfg
rm_conffile /etc/X11/Xsession.d/50panic_on_oops
rm_conffile /etc/X11/Xsession.d/50security-misc

View File

@ -1,9 +0,0 @@
#!/bin/sh
## Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
if [ -z "$XDG_CONFIG_DIRS" ]; then
XDG_CONFIG_DIRS=/etc/xdg
fi
export XDG_CONFIG_DIRS=/usr/share/security-misc/:$XDG_CONFIG_DIRS

View File

@ -3,6 +3,11 @@
## Copyright (C) 2019 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
if [ -z "$XDG_CONFIG_DIRS" ]; then
XDG_CONFIG_DIRS=/etc/xdg
fi
export XDG_CONFIG_DIRS=/usr/share/security-misc/:$XDG_CONFIG_DIRS
if [ -x /usr/libexec/security-misc/panic-on-oops ]; then
sudo --non-interactive /usr/libexec/security-misc/panic-on-oops
fi