diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-02-13 12:32:26 -0800 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-02-13 18:44:28 -0800 |
commit | afa6ec97cc90ce45086df13ca7a5914a28175820 (patch) | |
tree | 522bf10817c2175401c296f5f5d1f25b7b9b5386 /instfiles/pam.d/Makefile.am | |
parent | fe055e989aef5954279af6bec70918b41597e268 (diff) | |
download | xrdp-proprietary-afa6ec97cc90ce45086df13ca7a5914a28175820.tar.gz xrdp-proprietary-afa6ec97cc90ce45086df13ca7a5914a28175820.zip |
Install the most appropriate PAM settings file
Installing a file referring to common-auth is of no use if that file
doesn't exit.
Don't use "password" entry, xrdp doesn't ever change user password.
Diffstat (limited to 'instfiles/pam.d/Makefile.am')
-rw-r--r-- | instfiles/pam.d/Makefile.am | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/instfiles/pam.d/Makefile.am b/instfiles/pam.d/Makefile.am index d51d5c20..3e09802b 100644 --- a/instfiles/pam.d/Makefile.am +++ b/instfiles/pam.d/Makefile.am @@ -1,4 +1,9 @@ -EXTRA_DIST = xrdp-sesman +EXTRA_DIST = \ + xrdp-sesman.common \ + xrdp-sesman.other \ + xrdp-sesman.password-auth + +CLEANFILES = xrdp-sesman if SESMAN_NOPAM PAMFILE = @@ -14,7 +19,19 @@ endif endif endif -pamddir=$(sysconfdir)/pam.d +pamddir = $(sysconfdir)/pam.d pamd_DATA = \ $(PAMFILE) + +xrdp-sesman: + if test -e /etc/pam.d/password-auth; then \ + pamrules=xrdp-sesman.password-auth; \ + else \ + if test -e /etc/pam.d/common-auth; then \ + pamrules=xrdp-sesman.common; \ + else \ + pamrules=xrdp-sesman.other; \ + fi; \ + fi; \ + $(LN_S) $(srcdir)/$$pamrules $@ |