summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsghctoma <sghctoma@gmail.com>2018-08-30 09:58:57 +0200
committersghctoma <sghctoma@gmail.com>2018-08-30 09:58:57 +0200
commit2376a9c5d788daa9894c7396bb2a6c41dfb5df26 (patch)
tree8be01d08b14998fc7694bf74aa644db6bf8a3fd3
parent01e7492d702841bcfebbb99f42866b35ac9f4fe9 (diff)
Add FreeBSD-specific PAM configuration
The "login" PAM configuration means somathing entirely different on FreeBSD than on Linux: if you try to authenticate as the calling user, it OKs the request without prompting for password. The "passwd" config implements the desired functionality, therefore it should be used by swaylock.
-rw-r--r--meson.build17
-rw-r--r--pam/swaylock.freebsd6
-rw-r--r--pam/swaylock.linux (renamed from pam/swaylock)0
3 files changed, 19 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 63f694b..675b8c6 100644
--- a/meson.build
+++ b/meson.build
@@ -24,7 +24,16 @@ executable(
install: true
)
-install_data(
- 'pam/swaylock',
- install_dir: sysconfdir + '/pam.d/'
-)
+if is_freebsd
+ install_data(
+ 'pam/swaylock.freebsd',
+ install_dir: sysconfdir + '/pam.d/',
+ rename: 'swaylock'
+ )
+else
+ install_data(
+ 'pam/swaylock.linux',
+ install_dir: sysconfdir + '/pam.d/',
+ rename: 'swaylock'
+ )
+endif
diff --git a/pam/swaylock.freebsd b/pam/swaylock.freebsd
new file mode 100644
index 0000000..603fc18
--- /dev/null
+++ b/pam/swaylock.freebsd
@@ -0,0 +1,6 @@
+#
+# PAM configuration file for the swaylock screen locker. By default, it includes
+# the 'passwd' configuration file (see /etc/pam.d/passwd)
+#
+
+auth include passwd
diff --git a/pam/swaylock b/pam/swaylock.linux
index 6a36b0d..6a36b0d 100644
--- a/pam/swaylock
+++ b/pam/swaylock.linux