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 6942f5b684
commit 6de777a986
3 changed files with 19 additions and 4 deletions

View file

@ -24,7 +24,16 @@ executable(
install: true install: true
) )
if is_freebsd
install_data( install_data(
'pam/swaylock', 'pam/swaylock.freebsd',
install_dir: sysconfdir + '/pam.d/' install_dir: sysconfdir + '/pam.d/',
rename: 'swaylock'
) )
else
install_data(
'pam/swaylock.linux',
install_dir: sysconfdir + '/pam.d/',
rename: 'swaylock'
)
endif

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