mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
delete legacy folder /etc/permission-hardening.d if empty
https://github.com/Kicksecure/security-misc/pull/181
This commit is contained in:
parent
9cafd78fe2
commit
6aa55698ab
14
debian/security-misc.postinst
vendored
14
debian/security-misc.postinst
vendored
@ -15,7 +15,7 @@ true "
|
||||
#####################################################################
|
||||
"
|
||||
|
||||
permission_hardening_legacy() {
|
||||
permission_hardening_legacy_state_files() {
|
||||
if test -d /var/lib/permission-hardener ; then
|
||||
return 0
|
||||
fi
|
||||
@ -25,6 +25,13 @@ permission_hardening_legacy() {
|
||||
mv --verbose /var/lib/permission-hardening /var/lib/permission-hardener
|
||||
}
|
||||
|
||||
permission_hardening_legacy_config_folder() {
|
||||
if ! test -d /etc/permission-hardening.d ; then
|
||||
return 0
|
||||
fi
|
||||
rmdir --verbose --ignore-fail-on-non-empty /etc/permission-hardening.d || true
|
||||
}
|
||||
|
||||
permission_hardening() {
|
||||
echo ""
|
||||
echo "Running SUID Disabler and Permission Hardener... See also:"
|
||||
@ -69,7 +76,8 @@ esac
|
||||
pam-auth-update --package
|
||||
|
||||
/usr/libexec/security-misc/permission-lockdown
|
||||
permission_hardening_legacy
|
||||
permission_hardening_legacy_state_files
|
||||
|
||||
permission_hardening
|
||||
|
||||
## https://phabricator.whonix.org/T377
|
||||
@ -92,6 +100,8 @@ true "INFO: debhelper beginning here."
|
||||
|
||||
true "INFO: Done with debhelper."
|
||||
|
||||
permission_hardening_legacy_config_folder
|
||||
|
||||
true "
|
||||
#####################################################################
|
||||
## INFO: END : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
|
||||
|
Loading…
Reference in New Issue
Block a user