2017-02-19 17:25:28 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-29 10:22:05 -05:00
|
|
|
## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
2017-02-19 17:25:28 -05:00
|
|
|
## See the file COPYING for copying conditions.
|
|
|
|
|
2019-05-12 02:58:45 -04:00
|
|
|
if [ -f /usr/lib/helper-scripts/pre.bsh ]; then
|
|
|
|
source /usr/lib/helper-scripts/pre.bsh
|
2017-02-19 17:25:28 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
true "
|
|
|
|
#####################################################################
|
2017-03-06 10:00:33 -05:00
|
|
|
## INFO: BEGIN: $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
|
2017-02-19 17:25:28 -05:00
|
|
|
#####################################################################
|
|
|
|
"
|
|
|
|
|
2019-07-13 12:20:14 -04:00
|
|
|
home_folder_access_rights_lockdown() {
|
|
|
|
mkdir -p /var/cache/security-misc/state-files
|
|
|
|
|
|
|
|
shopt -s nullglob
|
|
|
|
|
|
|
|
## Not using dotglob.
|
|
|
|
## touch /var/cache/security-misc/state-files//home/.Trash
|
|
|
|
## touch: cannot touch '/var/cache/security-misc/state-files//home/.Trash': No such file or directory
|
|
|
|
|
|
|
|
local folder_name base_name
|
|
|
|
|
|
|
|
for folder_name in /home/* ; do
|
|
|
|
base_name="$(basename "$folder_name")"
|
|
|
|
if [ -f "/var/cache/security-misc/state-files/$base_name" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
chmod o-rwx "$folder_name"
|
|
|
|
## Create a state-file so we do this only once.
|
|
|
|
## Therefore a user who will manually undo this, will not get
|
|
|
|
## annoyed by this being done over and over again.
|
|
|
|
touch "/var/cache/security-misc/state-files/$base_name"
|
|
|
|
done
|
|
|
|
|
|
|
|
shopt -u nullglob
|
|
|
|
}
|
|
|
|
|
2017-02-19 17:25:28 -05:00
|
|
|
case "$1" in
|
|
|
|
configure)
|
2017-02-19 17:32:04 -05:00
|
|
|
glib-compile-schemas /usr/share/glib-2.0/schemas || true
|
2017-02-19 17:25:28 -05:00
|
|
|
;;
|
|
|
|
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "$DPKG_MAINTSCRIPT_NAME called with unknown argument \`$1'" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2019-07-31 03:29:42 -04:00
|
|
|
addgroup root sudo
|
|
|
|
|
2019-07-13 07:41:37 -04:00
|
|
|
pam-auth-update --package
|
2019-07-07 16:51:40 -04:00
|
|
|
|
2019-07-13 12:20:14 -04:00
|
|
|
home_folder_access_rights_lockdown
|
|
|
|
|
2017-02-19 17:25:28 -05:00
|
|
|
true "INFO: debhelper beginning here."
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
true "INFO: Done with debhelper."
|
|
|
|
|
|
|
|
true "
|
|
|
|
#####################################################################
|
2017-03-06 10:00:33 -05:00
|
|
|
## INFO: END : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
|
2017-02-19 17:25:28 -05:00
|
|
|
#####################################################################
|
|
|
|
"
|
|
|
|
|
|
|
|
## Explicitly "exit 0", so eventually trapped errors can be ignored.
|
|
|
|
exit 0
|