From 6de777a986e1b8d38e5030106f2abb937eca6232 Mon Sep 17 00:00:00 2001 From: sghctoma Date: Thu, 30 Aug 2018 09:58:57 +0200 Subject: [PATCH] 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. --- swaylock/meson.build | 17 +++++++++++++---- swaylock/pam/swaylock.freebsd | 6 ++++++ swaylock/pam/{swaylock => swaylock.linux} | 0 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 swaylock/pam/swaylock.freebsd rename swaylock/pam/{swaylock => swaylock.linux} (100%) diff --git a/swaylock/meson.build b/swaylock/meson.build index 63f694b94..675b8c697 100644 --- a/swaylock/meson.build +++ b/swaylock/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/swaylock/pam/swaylock.freebsd b/swaylock/pam/swaylock.freebsd new file mode 100644 index 000000000..603fc1850 --- /dev/null +++ b/swaylock/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/swaylock/pam/swaylock b/swaylock/pam/swaylock.linux similarity index 100% rename from swaylock/pam/swaylock rename to swaylock/pam/swaylock.linux