diff options
author | Koichiro IWAO <meta@vmeta.jp> | 2017-07-19 15:41:32 +0900 |
---|---|---|
committer | metalefty <meta@vmeta.jp> | 2017-07-26 11:34:01 +0900 |
commit | 05ef6d104e5a13af55b61debab28eca3c04fe53e (patch) | |
tree | 7b077c78fdbacfc8bc108b0d62fe14f125bd7521 | |
parent | e990dd4263b48c69ddb0507513933479f0c4983b (diff) | |
download | xrdp-proprietary-05ef6d104e5a13af55b61debab28eca3c04fe53e.tar.gz xrdp-proprietary-05ef6d104e5a13af55b61debab28eca3c04fe53e.zip |
sesman: search pam files also in ${sysconfdir}/pam.d
as some operating system such as FreeBSD searches not only `/etc/pam.d`
but also `/usr/local/etc/pam.d` [1].
[1] https://www.freebsd.org/cgi/man.cgi?query=pam.d&sektion=5
-rw-r--r-- | sesman/Makefile.am | 1 | ||||
-rw-r--r-- | sesman/verify_user_pam.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 74ec183f..193a7cce 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -2,6 +2,7 @@ EXTRA_DIST = \ Doxyfile AM_CPPFLAGS = \ + -DXRDP_SYSCONF_PATH=\"${sysconfdir}\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ diff --git a/sesman/verify_user_pam.c b/sesman/verify_user_pam.c index 15174c24..05e941bb 100644 --- a/sesman/verify_user_pam.c +++ b/sesman/verify_user_pam.c @@ -91,7 +91,8 @@ get_service_name(char *service_name) { service_name[0] = 0; - if (g_file_exist("/etc/pam.d/xrdp-sesman")) + if (g_file_exist("/etc/pam.d/xrdp-sesman") || + g_file_exist(XRDP_SYSCONF_PATH "/pam.d/xrdp-sesman")) { g_strncpy(service_name, "xrdp-sesman", 255); } |