diff --git a/cde/programs/dtlogin/Imakefile b/cde/programs/dtlogin/Imakefile index 057b7fb25..66ea26222 100644 --- a/cde/programs/dtlogin/Imakefile +++ b/cde/programs/dtlogin/Imakefile @@ -130,7 +130,7 @@ DEPXAUTHLIB = DEPXDMCPLIB = #endif -#ifdef HasPamLibrary +#if defined(HasPamLibrary) && HasPamLibrary DTPAMSVCLIB = -lDtPamSvc EXTRA_DEFINES += -DHAS_PAM_LIBRARY #else diff --git a/cde/programs/dtlogin/config/Imakefile b/cde/programs/dtlogin/config/Imakefile index 4728678e2..3f6b46ac0 100644 --- a/cde/programs/dtlogin/config/Imakefile +++ b/cde/programs/dtlogin/config/Imakefile @@ -26,7 +26,7 @@ LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \ LOCAL_CPP_DEFINES += -DFREEBSD #endif -#ifdef HasPamLibrary +#if defined(HasPamLibrary) && HasPamLibrary LOCAL_CPP_DEFINES += -DHAS_PAM_LIBRARY #ifdef PamAuthenticationModule PAM_AUTHENTICATION_MODULE=PamAuthenticationModule @@ -91,6 +91,6 @@ CppSourceFile(dtlslocale,dtlslocale.src,$(LOCAL_CPP_DEFINES),) CppSourceFile(dtprofile,dtprofile.src,$(LOCAL_CPP_DEFINES),) CppSourceFile(home.session,home.session.src,$(LOCAL_CPP_DEFINES),) -#ifdef HasPamLibrary +#if defined(HasPamLibrary) && HasPamLibrary CppSourceFile(dtlogin.pam.conf,dtlogin.pam.conf.src,$(LOCAL_CPP_DEFINES),) #endif diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index e5771038c..7de230dd8 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -105,6 +105,10 @@ #include "rgy_base.h" #endif +#ifdef HAS_PAM_LIBRARY +#include +#endif + #ifdef SIA static SIAENTITY *siaHandle = NULL; @@ -313,7 +317,7 @@ SessionPingFailed( struct display *d ) #endif #if !defined(sun) && defined(HAS_PAM_LIBRARY) - Account(d, user, NULL, clientPid, DEAD_PROCESS, NULL); + Account(d, user, NULL, clientPid, DEAD_PROCESS, 0); #endif } SessionExit (d, RESERVER_DISPLAY); @@ -638,7 +642,7 @@ ManageSession( struct display *d ) #endif #if !defined(sun) && defined(HAS_PAM_LIBRARY) - Account(d, user, NULL, clientPid, DEAD_PROCESS, NULL); + Account(d, user, NULL, clientPid, DEAD_PROCESS, 0); #endif SessionExit (d, OBEYSESS_DISPLAY);