diff --git a/Makefile b/Makefile index 1ff610e..0cd29e7 100644 --- a/Makefile +++ b/Makefile @@ -198,5 +198,8 @@ install-deb: install -D -m 644 network/ip6tables $(DESTDIR)/etc/iptables/rules.v6 install -d $(DESTDIR)/etc/sysctl.d install -m 644 network/80-qubes.conf $(DESTDIR)/etc/sysctl.d/ + install -D -m 644 misc/profile.d_qt_x11_no_mitshm.sh $(DESTDIR)/etc/profile.d/qt_x11_no_mitshm.sh + install -D -m 440 misc/sudoers.d_umask $(DESTDIR)/etc/sudoers.d/umask + install -D -m 440 misc/sudoers.d_qt_x11_no_mitshm $(DESTDIR)/etc/sudoers.d/qt_x11_no_mitshm install-vm: install-rh install-common diff --git a/debian/qubes-core-agent.postinst b/debian/qubes-core-agent.postinst index 920be66..e0f7d71 100755 --- a/debian/qubes-core-agent.postinst +++ b/debian/qubes-core-agent.postinst @@ -211,18 +211,6 @@ case "${1}" in dpkg-divert --divert /etc/init/${init}.conf.qubes-disabled --package qubes-core-agent --rename --add /etc/init/${init}.conf done - # Stops Qt form using the MIT-SHM X11 Shared Memory Extension - echo 'export QT_X11_NO_MITSHM=1' > /etc/profile.d/qt_x11_no_mitshm.sh - chmod 0755 /etc/profile.d/qt_x11_no_mitshm.sh - - # 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.d/umask - echo 'Defaults umask_override' >> /etc/sudoers.d/umask - chmod 0440 /etc/sudoers.d/umask - echo 'Defaults env_keep += "QT_X11_NO_MITSHM"' > /etc/sudoers.d/qt_x11_no_mitshm - chmod 0440 /etc/sudoers.d/qt_x11_no_mitshm - # Create NetworkManager configuration if we do not have it if ! [ -e /etc/NetworkManager/NetworkManager.conf ]; then echo '[main]' > /etc/NetworkManager/NetworkManager.conf diff --git a/misc/profile.d_qt_x11_no_mitshm.sh b/misc/profile.d_qt_x11_no_mitshm.sh new file mode 100644 index 0000000..1653d48 --- /dev/null +++ b/misc/profile.d_qt_x11_no_mitshm.sh @@ -0,0 +1,2 @@ +# Stops Qt form using the MIT-SHM X11 Shared Memory Extension +export QT_X11_NO_MITSHM=1 diff --git a/misc/sudoers.d_qt_x11_no_mitshm b/misc/sudoers.d_qt_x11_no_mitshm new file mode 100644 index 0000000..c6ddcec --- /dev/null +++ b/misc/sudoers.d_qt_x11_no_mitshm @@ -0,0 +1,2 @@ +# Don't allow QT to used shared memory to prevent errors +Defaults env_keep += "QT_X11_NO_MITSHM" diff --git a/misc/sudoers.d_umask b/misc/sudoers.d_umask new file mode 100644 index 0000000..fea0fab --- /dev/null +++ b/misc/sudoers.d_umask @@ -0,0 +1,3 @@ +# Sudo's defualt umask is 077 so set sane default of 022 +Defaults umask = 0002 +Defaults umask_override