From 4bd8223415ea915caaea84823af53b07755a1731 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 21 Apr 2026 06:05:45 +0200 Subject: [PATCH] build: fix helper includes and CMake library paths --- CMakeLists.txt | 9 ++------- check_login.c | 2 ++ config.h.cmake | 2 +- smart.cmake | 2 +- smart.conf.cmake | 4 ++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfbcd3b..24752c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,11 +6,6 @@ # Dependencies ############## -find_package(OpenSSL REQUIRED) - -find_library(PAM_LIB pam REQUIRED) -find_library(DL_LIB dl REQUIRED) - ################################# # Generated files ############## @@ -57,8 +52,8 @@ target_link_libraries(nwwebui ) target_link_libraries(check_login - ${PAM_LIB} - ${DL_LIB} + ${PAM_LIBRARY} + ${DL_LIBRARY} ) ################################# diff --git a/check_login.c b/check_login.c index 0bda894..3b4e8d6 100644 --- a/check_login.c +++ b/check_login.c @@ -23,6 +23,8 @@ #include #include +#include +#include int my_conv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr); diff --git a/config.h.cmake b/config.h.cmake index a6f7144..406e65d 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -2,7 +2,7 @@ #define NWWEBUI_CONFIG_H #define DEFAULT_SMART_CONF "@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf" -#define DEFAULT_SMART_PERL "@MARS_NWE_INSTALL_FULL_LIBEXEC@/smart" +#define DEFAULT_SMART_PERL "@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/smart" #define LOG_PATH_DEFAULT "@MARS_NWE_LOG_DIR@/nwwebui.log" diff --git a/smart.cmake b/smart.cmake index c52a90a..b16fd43 100755 --- a/smart.cmake +++ b/smart.cmake @@ -35,7 +35,7 @@ open( STDERR, '>>' . $smart_log_path ) or die "Could not open $smart_log_path: $!"; $ENV{HOME} = '@MARS_NWE_INSTALL_FULL_CONFDIR@'; -$smart_libexec_dir = '@MARS_NWE_INSTALL_FULL_LIBEXEC@'; +$smart_libexec_dir = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@'; $smart_libexec_dir =~ s#/*$##; $l = ; diff --git a/smart.conf.cmake b/smart.conf.cmake index 7ce1f6f..494f061 100644 --- a/smart.conf.cmake +++ b/smart.conf.cmake @@ -12,10 +12,10 @@ $nonroot_user = 'nobody'; $smart_conf_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf'; $smart_nwclient_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/.nwclient'; -$smart_static_dir = '@MARS_NWE_INSTALL_FULL_LIBEXEC@/static'; +$smart_static_dir = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/static'; $smart_log_path = '@MARS_NWE_LOG_DIR@/smart.log'; -$smart_check_login = '@MARS_NWE_INSTALL_FULL_LIBEXEC@/check_login'; +$smart_check_login = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/check_login'; $nw_bind_ip = '0.0.0.0'; $nw_tls_port = 9443;