From be37c6cc5b9aef6e220ef973b26c33d0bcdebd72 Mon Sep 17 00:00:00 2001 From: Jason Mehring Date: Sun, 2 Nov 2014 16:28:50 -0500 Subject: [PATCH] debian: force shell to be bash since its default is dash and many qubes scripts rely on bash and will break in dash and added tinyproxy user --- debian/postinst | 10 ++++++++++ debian/preinst | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/debian/postinst b/debian/postinst index 634579a..39a707b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -34,6 +34,16 @@ case "$1" in fi } + + # Stops Qt form using the MIT-SHM X11 Shared Memory Extension + echo 'export QT_X11_NO_MITSHM=1' >> /etc/profile + + # Sudo's defualt umask is 077 so set sane default of 022 + # Also don't allow QT to used shared memory to prevent errors + echo 'Defaults umask = 0002' >> /etc/sudoers + echo 'Defaults umask_override' >> /etc/sudoers + echo 'Defaults env_keep += "QT_X11_NO_MITSHM"' >> /etc/sudoers + # reenable abrt-aplet if disable by some earlier version of package remove_ShowIn abrt-applet.desktop diff --git a/debian/preinst b/debian/preinst index 41e9e3e..4a6876e 100755 --- a/debian/preinst +++ b/debian/preinst @@ -45,6 +45,13 @@ if [ "$1" = "install" ] ; then mv /etc/fstab /var/lib/qubes/fstab.orig fi + # -------------------------------------------------------------------------- + # Many Qubes scripts reference /bin/sh expecting the shell to be bash but + # in Debian it is dash so some scripts will fail so force an alternate for + # /bin/sh to be /bin/bash + # -------------------------------------------------------------------------- + update-alternatives --force --install /bin/sh sh /bin/bash 999 + # -------------------------------------------------------------------------- # Modules setup # -------------------------------------------------------------------------- @@ -82,6 +89,10 @@ EOF groupadd -f user useradd -g user -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user } + id -u 'tinyproxy' || { + groupadd -f tinyproxy + useradd -g tinyproxy -M --home /run/tinyproxy --shell /bin/false tinyproxy + } usermod -p '' root usermod -L user exit 0