Add PAM support to dtlogin.
This commit is contained in:
@@ -26,6 +26,14 @@ LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
|
||||
LOCAL_CPP_DEFINES += -DFREEBSD
|
||||
#endif
|
||||
|
||||
#ifdef HasPamLibrary
|
||||
LOCAL_CPP_DEFINES += -DHAS_PAM_LIBRARY
|
||||
#ifdef PamAuthenticationModule
|
||||
PAM_AUTHENTICATION_MODULE=PamAuthenticationModule
|
||||
LOCAL_CPP_DEFINES += -DPAM_AUTHENTICATION_MODULE=$(PAM_AUTHENTICATION_MODULE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SunArchitecture
|
||||
EXTRA_CPP_TARGETS = \
|
||||
0015.sun.env \
|
||||
@@ -48,7 +56,8 @@ CPP_TARGETS = \
|
||||
Xstartup current.session \
|
||||
display.current.session display.home.session \
|
||||
dtlslocale dtprofile \
|
||||
home.session $(EXTRA_CPP_TARGETS)
|
||||
home.session dtlogin.pam.conf \
|
||||
$(EXTRA_CPP_TARGETS)
|
||||
|
||||
AllTarget($(CPP_TARGETS))
|
||||
|
||||
@@ -81,3 +90,7 @@ CppSourceFile(display.home.session,display.home.session.src,$(LOCAL_CPP_DEFINES)
|
||||
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
|
||||
CppSourceFile(dtlogin.pam.conf,dtlogin.pam.conf.src,$(LOCAL_CPP_DEFINES),)
|
||||
#endif
|
||||
|
||||
@@ -80,3 +80,18 @@ fi
|
||||
fi
|
||||
fi
|
||||
#endif
|
||||
|
||||
#ifdef HAS_PAM_LIBRARY
|
||||
#ifdef __FreeBSD__
|
||||
#define PAM_D /usr/local/etc/pam.d
|
||||
#else
|
||||
#define PAM_D /etc/pam.d
|
||||
#endif
|
||||
|
||||
if [ ! -f PAM_D/dtlogin ]; then
|
||||
if [ -f CDE_INSTALLATION_TOP/config/dtlogin.pam.conf ]; then
|
||||
/bin/cp CDE_INSTALLATION_TOP/config/dtlogin.pam.conf PAM_D/dtlogin
|
||||
/bin/chmod 644 PAM_D/dtlogin
|
||||
fi
|
||||
fi
|
||||
#endif
|
||||
|
||||
11
cde/programs/dtlogin/config/dtlogin.pam.conf.src
Normal file
11
cde/programs/dtlogin/config/dtlogin.pam.conf.src
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifdef PAM_AUTHENTICATION_MODULE
|
||||
auth sufficient PAM_AUTHENTICATION_MODULE
|
||||
#endif
|
||||
auth required pam_unix.so
|
||||
|
||||
account required pam_nologin.so
|
||||
account required pam_unix.so
|
||||
|
||||
session required pam_lastlog.so
|
||||
|
||||
password required pam_deny.so
|
||||
Reference in New Issue
Block a user