Skip to content

Commit

Permalink
meson: add Debian-specific PAM file and use it when os_type is debian
Browse files Browse the repository at this point in the history
In Debian and derivatives PAM uses different syntax, so add an
alternative PAM config file, and install it instead of the default
one if the os_type is debian. We have been using this PAM config
in Debian and derivatives since pretty much forever.
  • Loading branch information
bluca authored and jrybar-rh committed Dec 19, 2024
1 parent 5a53de1 commit 080e63b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
22 changes: 15 additions & 7 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ configure_file(
)

if enable_pam
configure_file(
input: 'polkit-1.in',
output: '@BASENAME@',
configuration: pam_conf,
install: true,
install_dir: pam_prefix,
)
if os_type == 'debian' and pam_include == ''
install_data(
'polkit-1.debian',
rename: 'polkit-1',
install_dir: pam_prefix
)
else
configure_file(
input: 'polkit-1.in',
output: '@BASENAME@',
configuration: pam_conf,
install: true,
install_dir: pam_prefix,
)
endif
endif

if not get_option('libs-only')
Expand Down
8 changes: 8 additions & 0 deletions data/polkit-1.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#%PAM-1.0

@include common-auth
@include common-account
@include common-password
session required pam_env.so readenv=1 user_readenv=0
session required pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0
@include common-session-noninteractive

0 comments on commit 080e63b

Please sign in to comment.