Skip to content

Commit 5235298

Browse files
romanmichalvasko
authored andcommitted
cmake UPDATE add kbdint method message
1 parent 5056697 commit 5235298

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
224224
set(CMAKE_REQUIRED_LIBRARIES pthread)
225225
check_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+
227230
if(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)
278285
target_link_libraries(netconf2 ${LIBYANG_LIBRARIES})
279286
include_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
285289
if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
286290
target_link_libraries(netconf2 -lsocket)

0 commit comments

Comments
 (0)