summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2023-03-30 21:54:25 -0500
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-06-05 11:59:33 +0900
commit8c543e26ec35237d00ec44fadda80318c386fdde (patch)
treed1841ffeaeae655a3a19878ef597fe4a99517f6b /ConfigureChecks.cmake
parent950f0ce73685e0dbadba7351738d78a9fbdb71f4 (diff)
downloadtdebase-8c543e26ec35237d00ec44fadda80318c386fdde.tar.gz
tdebase-8c543e26ec35237d00ec44fadda80318c386fdde.zip
kcheckpass: fix shadow support when not building tdm
1. If not building with PAM, kcheckpass relies on HAVE_SHADOW to decide whether to support shadow passwords. However, this was only set if also building tdm. Consolidate all PAM/shadow configure checks at the top level so these are always set correctly. 2. Consolidate /etc/passwd and shadow password handling The shadow password handler already completely handles /etc/passwd passwords as well, so having a separate handler for just /etc/passwd is pure code duplication. Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake26
1 files changed, 16 insertions, 10 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index fff59ab29..5f455765b 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -103,16 +103,22 @@ if( BUILD_TDEIOSLAVES )
endif( )
-# pam
-if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) )
- check_library_exists( pam pam_start "" HAVE_PAM )
- if( HAVE_PAM )
- check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
- endif( )
- if( HAVE_PAM AND SECURITY_PAM_APPL_H )
- set( PAM_LIBRARY pam ${DL_LIBRARIES} )
- else( )
- tde_message_fatal( "pam are requested, but not found on your system" )
+# pam and shadow
+if( BUILD_KCHECKPASS OR BUILD_TDM )
+ if ( WITH_PAM )
+ check_library_exists( pam pam_start "" HAVE_PAM )
+ if( HAVE_PAM )
+ set( USEPAM 1 CACHE INTERNAL "" FORCE )
+ check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
+ endif( )
+ if( HAVE_PAM AND SECURITY_PAM_APPL_H )
+ set( PAM_LIBRARY pam ${DL_LIBRARIES} )
+ else( )
+ tde_message_fatal( "pam are requested, but not found on your system" )
+ endif( )
+ elseif( WITH_SHADOW )
+ set( HAVE_SHADOW 1 CACHE INTERNAL "" FORCE )
+ set( USESHADOW 1 CACHE INTERNAL "" FORCE )
endif( )
endif( )