From e5796ac8a023bc9f5822a7f8e67a4b8be4745dba Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Sat, 9 Aug 2008 08:35:05 +0000 Subject: [PATCH] added sesman auth options --- configure.ac | 18 ++++++++++++++++++ sesman/Makefile.am | 24 +++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6016ca62..04ac1342 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,18 @@ AM_INIT_AUTOMAKE([1.6 foreign]) AC_PROG_CC AC_C_CONST AC_PROG_LIBTOOL +AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam], + [Build no PAM support (default: no)]), + [nopam=true], [nopam=false]) +AM_CONDITIONAL(SESMAN_NOPAM, [test x$nopam = xtrue]) +AC_ARG_ENABLE(kerberos, AS_HELP_STRING([--enable-kerberos], + [Build kerberos support (default: no)]), + [kerberos=true], [kerberos=false]) +AM_CONDITIONAL(SESMAN_KERBEROS, [test x$kerberos = xtrue]) +AC_ARG_ENABLE(pamuserpass, AS_HELP_STRING([--enable-pamuserpass], + [Build pam userpass support (default: no)]), + [pamuserpass=true], [pamuserpass=false]) +AM_CONDITIONAL(SESMAN_PAMUSERPASS, [test x$pamuserpass = xtrue]) AC_CONFIG_FILES([Makefile common/Makefile vnc/Makefile @@ -26,3 +38,9 @@ AC_CONFIG_FILES([Makefile # xrdp/cursors/Makefile # Xserver/hw/rdp/Makefile AC_OUTPUT + +# example of how to check for a struct in a header +#AC_CHECK_MEMBER([struct in6_addr.s6_addr], +# [], +# [AC_DEFINE(NO_ARPA_INET_H_IP6, 1, [for IPv6])], +# [#include ]) diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 0f22f9bc..0d19a0e3 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -2,6 +2,24 @@ INCLUDES = \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp +if SESMAN_NOPAM +AUTH_C = verify_user.c +AUTH_LIB = -lcrypt +else +if SESMAN_PAMUSERPASS +AUTH_C = verify_user_pam_userpass.c +AUTH_LIB = -lpam -lpam_userpass +else +if SESMAN_KERBEROS +AUTH_C = verify_user_kerberos.c +AUTH_LIB = -lkrb5 +else +AUTH_C = verify_user_pam.c +AUTH_LIB = -lpam +endif +endif +endif + bin_PROGRAMS = \ xrdp-sesman \ xrdp-sessvc @@ -14,11 +32,11 @@ xrdp_sesman_SOURCES = \ session.c \ sig.c \ thread.c \ - verify_user_pam.c \ lock.c \ access.c \ config.c \ - env.c + env.c \ + $(AUTH_C) xrdp_sessvc_SOURCES = \ sessvc.c @@ -26,7 +44,7 @@ xrdp_sessvc_SOURCES = \ xrdp_sesman_LDADD = \ $(top_srcdir)/common/libxrdp-common.la \ $(top_srcdir)/sesman/libscp/libscp.la \ - -lpam + $(AUTH_LIB) xrdp_sessvc_LDADD = \ $(top_srcdir)/common/libxrdp-common.la