Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

pipewire-pulse: no module loading (a restricted app's module would run outside its scope)

Federico Pereira96633070c6bf
diff --git a/tools/iso/build.sh b/tools/iso/build.sh
index 9980b0b..db24417 100755
--- a/tools/iso/build.sh
+++ b/tools/iso/build.sh
@@ -105,6 +105,7 @@ PY
fi
# Firefox ESR: same (the user changes it in Customize Toolbar > Title Bar)
install -D -m 644 tools/iso/rootfs/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf "$CH/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf"
+install -D -m 644 tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf "$CH/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf"
install -d "$CH/etc/firefox-esr"
printf '%s\n' '// LordOS: Firefox windows use the system frame (the theme frame); change it in' \
'// Customize Toolbar > Title Bar, or in about:config.' \
diff --git a/tools/iso/mkdeb.sh b/tools/iso/mkdeb.sh
index 7fe2acb..bc8f8ed 100755
--- a/tools/iso/mkdeb.sh
+++ b/tools/iso/mkdeb.sh
@@ -71,6 +71,7 @@ install -m 644 assets/app-host.bundle.js "$L/assets/app-host.bundle.js"
[ -d assets/sysapps ] && cp -r assets/sysapps "$L/assets/"
install -m 755 tools/iso/rootfs/usr/lib/lordos/lordos-live-prep "$L/lordos-live-prep"
install -D -m 644 tools/iso/rootfs/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf "$PKG/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf"
+install -D -m 644 tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf "$PKG/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf"
install -m 644 tools/iso/rootfs/etc/systemd/system/lordos.service "$PKG/usr/lib/systemd/system/lordos.service"
# boot splash (docs/brand/README.md, "Boot splash"): the Plymouth theme and the hand-off to LordOS
install -m 755 tools/boot/lordos-splash "$L/lordos-splash"
diff --git a/tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf b/tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf
new file mode 100644
index 0000000..126fab0
--- /dev/null
+++ b/tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf
@@ -0,0 +1,11 @@
+# LordOS: PulseAudio clients may not load modules into pipewire-pulse.
+#
+# pipewire-pulse runs outside every app's scope, so a module a restricted Linux app loaded would
+# work for it with none of its restrictions: a loopback from the microphone into a pipe or a TCP
+# server (no microphone), a tunnel or RTP sender to any host (no network), a pipe at any path of
+# the home folder (no files). Devices and Bluetooth are WirePlumber's, not modules: nothing in the
+# desktop needs this. Someone who does can turn it back on in
+# ~/.config/pipewire/pipewire-pulse.conf.d/ (see docs/FIREWALL.md, "Linux apps").
+pulse.properties = {
+ pulse.allow-module-loading = false
+}