summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2024-11-13 10:10:05 +0100
committerSimon Rettberg2024-11-13 10:10:05 +0100
commit2ab751d7e5e96e9a5f0d1e15ba46756afcfb0b3b (patch)
tree5569a1d3e9a04dc5e54994e682417f75867026e3 /core
parent[kiosk-firefox] Add new module (diff)
downloadmltk-2ab751d7e5e96e9a5f0d1e15ba46756afcfb0b3b.tar.gz
mltk-2ab751d7e5e96e9a5f0d1e15ba46756afcfb0b3b.tar.xz
mltk-2ab751d7e5e96e9a5f0d1e15ba46756afcfb0b3b.zip
[kiosk-chromium/kiosk-firefox] Minor tweaks, reorder browser fallback
Diffstat (limited to 'core')
-rw-r--r--core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/10-chromium-urlfilter8
-rw-r--r--core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/10-chromium (renamed from core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium)0
-rw-r--r--core/modules/kiosk-firefox/data/etc/X11/Xreset.d/clear-firefox-policies7
-rw-r--r--core/modules/kiosk-firefox/data/opt/openslx/pam/hooks/session-open.d/10-firefox-kiosk-policies1
-rw-r--r--core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/50-slxbrowser (renamed from core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser)0
5 files changed, 11 insertions, 5 deletions
diff --git a/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/10-chromium-urlfilter b/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/10-chromium-urlfilter
index 1287fff0..181bcd2a 100644
--- a/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/10-chromium-urlfilter
+++ b/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/10-chromium-urlfilter
@@ -2,7 +2,8 @@
#^ SOURCED, actually running in ash
# Protip: Comment out while editing, but DO NOT FORGET TO RE-ENABLE
-bash <<"EOF"
+[ "${PAM_SERVICE//autologin/}" != "$PAM_SERVICE" ] && [ "$PAM_TTY" = ":0" ] \
+ && bash <<"EOF"
format_urls() {
local url scheme host path chost arr
readarray -t -d ' ' arr < <( printf "%s" "$@" )
@@ -81,10 +82,7 @@ main() {
ln -nfs "$url_policy_file" "/etc/chromium/policies/managed/url-filter.json"
}
-if [ "${PAM_SERVICE//autologin/}" != "$PAM_SERVICE" ] && [ "$PAM_TTY" = ":0" ]; then
- # autologin of some sort
- main
-fi
+main
EOF
true
diff --git a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/10-chromium
index f165cfe1..f165cfe1 100644
--- a/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/00-chromium
+++ b/core/modules/kiosk-chromium/data/opt/openslx/scripts/kiosk-launch.d/10-chromium
diff --git a/core/modules/kiosk-firefox/data/etc/X11/Xreset.d/clear-firefox-policies b/core/modules/kiosk-firefox/data/etc/X11/Xreset.d/clear-firefox-policies
new file mode 100644
index 00000000..3beaacf5
--- /dev/null
+++ b/core/modules/kiosk-firefox/data/etc/X11/Xreset.d/clear-firefox-policies
@@ -0,0 +1,7 @@
+#!/bin/ash
+# ^ sourced
+
+for dir in /etc/firefox/policies /etc/firefox-esr/policies; do
+ [ -s "$dir/policies.default.json" ] || continue
+ mv -f "$dir/policies.default.json" "$dir/policies.json"
+done
diff --git a/core/modules/kiosk-firefox/data/opt/openslx/pam/hooks/session-open.d/10-firefox-kiosk-policies b/core/modules/kiosk-firefox/data/opt/openslx/pam/hooks/session-open.d/10-firefox-kiosk-policies
index 0e09764c..9f87dcf1 100644
--- a/core/modules/kiosk-firefox/data/opt/openslx/pam/hooks/session-open.d/10-firefox-kiosk-policies
+++ b/core/modules/kiosk-firefox/data/opt/openslx/pam/hooks/session-open.d/10-firefox-kiosk-policies
@@ -83,6 +83,7 @@ add_urls() {
. /opt/openslx/config
. /opt/openslx/bin/slx-tools
+mv -n "/etc/firefox/policies/policies.json" "/etc/firefox/policies/policies.default.json"
cp "/etc/firefox/policies/policies.kiosk.json" "/etc/firefox/policies/policies.json"
bookmarks="$( json_bookmarks $SLX_BROWSER_BOOKMARKS )"
diff --git a/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser b/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/50-slxbrowser
index ea9d2e4c..ea9d2e4c 100644
--- a/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser
+++ b/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/50-slxbrowser