diff --git a/configure.ac b/configure.ac index 593017bc..def4bfd6 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,7 @@ AC_ARG_ENABLE(pamuserpass, AS_HELP_STRING([--enable-pamuserpass], [], [enable_pamuserpass=no]) AM_CONDITIONAL(SESMAN_PAMUSERPASS, [test x$enable_pamuserpass = xyes]) AC_ARG_ENABLE(pam-config, AS_HELP_STRING([--enable-pam-config=CONF], - [Select PAM config to install: debian, redhat, suse, unix + [Select PAM config to install: debian, redhat, suse, freebsd, unix (default: autodetect)])) AC_ARG_ENABLE(xrdpdebug, AS_HELP_STRING([--enable-xrdpdebug], diff --git a/instfiles/pam.d/Makefile.am b/instfiles/pam.d/Makefile.am index d28a18e4..6cc6bddf 100644 --- a/instfiles/pam.d/Makefile.am +++ b/instfiles/pam.d/Makefile.am @@ -2,6 +2,7 @@ PAM_FILES = \ xrdp-sesman.debian \ xrdp-sesman.redhat \ xrdp-sesman.suse \ + xrdp-sesman.freebsd \ xrdp-sesman.unix EXTRA_DIST = $(PAM_FILES) mkpamrules diff --git a/instfiles/pam.d/mkpamrules b/instfiles/pam.d/mkpamrules index e2cfb77b..88444205 100755 --- a/instfiles/pam.d/mkpamrules +++ b/instfiles/pam.d/mkpamrules @@ -25,6 +25,11 @@ guess_rules () return fi + if test ! -f "$pamdir/system-auth" -a -s "$pamdir/system"; then + rules="freebsd" + return + fi + rules="unix" return } diff --git a/instfiles/pam.d/xrdp-sesman.freebsd b/instfiles/pam.d/xrdp-sesman.freebsd new file mode 100644 index 00000000..212acbfc --- /dev/null +++ b/instfiles/pam.d/xrdp-sesman.freebsd @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include system +account include system +password include system +session include system