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.
This commit is contained in:
sghctoma 2018-08-30 09:58:57 +02:00
parent 01e7492d70
commit 2376a9c5d7
3 changed files with 19 additions and 4 deletions

View File

@ -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

6
pam/swaylock.freebsd Normal file
View File

@ -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