This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch main
in repository entrance.
View the commit online.
commit 0a845f6d307d752936dc813cf5a66d2c065db483
Author: Alastair Poole <[email protected]>
AuthorDate: Wed Dec 2 20:53:48 2026 +0000
pam: add policies for debian and arch linux
---
README.md | 10 ++++++----
meson.options | 4 ++--
services/meson.build | 17 ++++++++++++-----
services/pam/debian/entrance | 7 +++++++
services/pam/debian/entrance-autologin | 9 +++++++++
services/pam/{arch => }/entrance-greeter | 0
6 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 5f5d0d5..cd0861a 100644
--- a/README.md
+++ b/README.md
@@ -53,10 +53,12 @@ meson compile -C build
sudo meson install -C build
```
-Meson installs PAM policies automatically on Arch-based systems with
-`system-login` and `system-local-login`. On other systems, provide policies for
-`entrance`, `entrance-greeter`, and `entrance-autologin` before starting
-Entrance. Policies in `/etc/pam.d` override the installed vendor policies.
+Meson installs PAM policies automatically when it detects the Arch
+`system-login` stack or Debian's `common-*` stack. For cross builds, select the
+target policies with `-Dpam_policies=arch` or `-Dpam_policies=debian`.
+If neither stack is detected, provide policies for `entrance`,
+`entrance-greeter`, and `entrance-autologin` before starting Entrance.
+Policies in `/etc/pam.d` override the installed vendor policies.
On systemd, a direct install creates the `entrance` system account and its
directories. When staging a package with `DESTDIR`, arrange for the package
diff --git a/meson.options b/meson.options
index 8cfd92c..5eedb4b 100644
--- a/meson.options
+++ b/meson.options
@@ -6,8 +6,8 @@ option('initial_vt', type: 'integer', min: 1, value: 1)
option('login_defs', type: 'string', value: '/etc/login.defs')
option('uid_min', type: 'integer', min: 0, value: 0)
option('uid_max', type: 'integer', min: 0, value: 0)
-option('pam_policies', type: 'combo', choices: ['auto', 'arch', 'disabled'], value: 'auto',
- description: 'PAM policies to install (auto detects the native system-login stack)')
+option('pam_policies', type: 'combo', choices: ['auto', 'arch', 'debian', 'disabled'], value: 'auto',
+ description: 'PAM policies to install (auto detects the native Arch or Debian PAM stack)')
option('pam_dir', type: 'string', value: '/usr/lib/pam.d',
description: 'Directory for vendor PAM policies')
option('greeter_only', type: 'boolean', value: false,
diff --git a/services/meson.build b/services/meson.build
index 675835d..b613e1e 100644
--- a/services/meson.build
+++ b/services/meson.build
@@ -19,12 +19,19 @@ endif
pam_policies = get_option('pam_policies')
fs = import('fs')
-if pam_policies == 'arch' or (pam_policies == 'auto' and not meson.is_cross_build()
- and fs.is_file('/etc/pam.d/system-login') and fs.is_file('/etc/pam.d/system-local-login'))
+if pam_policies == 'auto' and not meson.is_cross_build()
+ if fs.is_file('/etc/pam.d/system-login') and fs.is_file('/etc/pam.d/system-local-login')
+ pam_policies = 'arch'
+ elif fs.is_file('/etc/pam.d/common-auth') and fs.is_file('/etc/pam.d/common-account') and fs.is_file('/etc/pam.d/common-session') and fs.is_file('/etc/pam.d/common-password')
+ pam_policies = 'debian'
+ endif
+endif
+
+if pam_policies in ['arch', 'debian']
install_data(
- 'pam/arch/entrance',
- 'pam/arch/entrance-greeter',
- 'pam/arch/entrance-autologin',
+ 'pam' / pam_policies / 'entrance',
+ 'pam/entrance-greeter',
+ 'pam' / pam_policies / 'entrance-autologin',
install_dir: get_option('pam_dir'),
install_tag: 'pam',
)
diff --git a/services/pam/debian/entrance b/services/pam/debian/entrance
new file mode 100644
index 0000000..7ebc4e5
--- /dev/null
+++ b/services/pam/debian/entrance
@@ -0,0 +1,7 @@
+#%PAM-1.0
+
+auth requisite pam_nologin.so
+@include common-auth
+@include common-account
+@include common-session
+@include common-password
diff --git a/services/pam/debian/entrance-autologin b/services/pam/debian/entrance-autologin
new file mode 100644
index 0000000..1ef1ccf
--- /dev/null
+++ b/services/pam/debian/entrance-autologin
@@ -0,0 +1,9 @@
+#%PAM-1.0
+
+auth required pam_env.so
+auth required pam_shells.so
+auth required pam_nologin.so
+auth required pam_permit.so
+@include common-account
+@include common-session
+@include common-password
diff --git a/services/pam/arch/entrance-greeter b/services/pam/entrance-greeter
similarity index 100%
rename from services/pam/arch/entrance-greeter
rename to services/pam/entrance-greeter
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.