@@ -224,6 +224,9 @@ target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
224224set (CMAKE_REQUIRED_LIBRARIES pthread)
225225check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
226226
227+ # header file compatibility - shadow.h
228+ check_include_file("shadow.h" HAVE_SHADOW)
229+
227230if (ENABLE_SSH_TLS)
228231 # dependencies - openssl
229232 find_package (OpenSSL 3.0.0 REQUIRED)
@@ -257,8 +260,12 @@ if(ENABLE_SSH_TLS)
257260 target_link_libraries (netconf2 ${LIBPAM_LIBRARIES} )
258261 list (APPEND CMAKE_REQUIRED_LIBRARIES ${LIBPAM_LIBRARIES} )
259262 include_directories (${LIBPAM_INCLUDE_DIRS} )
263+
264+ message (STATUS "SSH Keyboard Interactive system method: Linux PAM" )
265+ elseif (HAVE_SHADOW)
266+ message (STATUS "SSH Keyboard Interactive system method: local users" )
260267 else ()
261- message (WARNING "LibPAM not found, PAM-based keyboard-interactive SSH server authentication method is disabled" )
268+ message (WARNING "SSH Keyboard Interactive system method: disabled" )
262269 endif ()
263270
264271 # set compiler flag
@@ -278,9 +285,6 @@ find_package(LibYANG ${LIBYANG_DEP_SOVERSION} REQUIRED)
278285target_link_libraries (netconf2 ${LIBYANG_LIBRARIES} )
279286include_directories (${LIBYANG_INCLUDE_DIRS} )
280287
281- # header file compatibility - shadow.h
282- check_include_file("shadow.h" HAVE_SHADOW)
283-
284288# function compatibility - getpeereid on QNX
285289if (${CMAKE_SYSTEM_NAME} MATCHES "QNX" )
286290 target_link_libraries (netconf2 -lsocket)
0 commit comments