diff options
-rw-r--r-- | CMakeLists.txt | 34 | ||||
-rw-r--r-- | config.h.in | 2 | ||||
-rw-r--r-- | pam_network_manager.c (renamed from pam_wlan.c) | 4 | ||||
-rw-r--r-- | pam_network_manager_helper.c (renamed from pam_wlan_helper.c) | 0 |
4 files changed, 20 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 17a8385..74cddb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required(VERSION 2.8.3) -project(PAM_WLAN C) +project(PAM_NETWORK_MANAGER C) -set(CMAKE_MODULE_PATH ${PAM_WLAN_SOURCE_DIR}) +set(CMAKE_MODULE_PATH ${PAM_NETWORK_MANAGER_SOURCE_DIR}) find_package(PAM REQUIRED) find_package(libnm_glib REQUIRED) set(PAM_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/lib/security" CACHE STRING "PAM module directory") -set(PAM_WLAN_HELPER_DIR "${CMAKE_INSTALL_PREFIX}/lib/security/pam_wlan" CACHE STRING "pam_wlan_helper install directory") +set(PAM_NETWORK_MANAGER_HELPER_DIR "${CMAKE_INSTALL_PREFIX}/lib/security/pam_network_manager" CACHE STRING "pam_network_manager_helper install directory") set(CONNECTION_TIMEOUT "10" CACHE STRING "Connection timeout") set(CONNECTION_ID "" CACHE STRING "Connection ID") @@ -23,22 +23,22 @@ link_directories(${LIBNM_GLIB_LIBRARY_DIRS}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -add_executable(pam_wlan_helper pam_wlan_helper.c) -set_property(TARGET pam_wlan_helper PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE") -set_property(TARGET pam_wlan_helper PROPERTY COMPILE_FLAGS "-std=c99 -Wall ${LIBNM_GLIB_CFLAGS_OTHER}") -set_property(TARGET pam_wlan_helper PROPERTY LINK_FLAGS "${LIBNM_GLIB_LDFLAGS_OTHER}") -target_link_libraries(pam_wlan_helper ${LIBNM_GLIB_LIBRARIES}) +add_executable(pam_network_manager_helper pam_network_manager_helper.c) +set_property(TARGET pam_network_manager_helper PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE") +set_property(TARGET pam_network_manager_helper PROPERTY COMPILE_FLAGS "-std=c99 -Wall ${LIBNM_GLIB_CFLAGS_OTHER}") +set_property(TARGET pam_network_manager_helper PROPERTY LINK_FLAGS "${LIBNM_GLIB_LDFLAGS_OTHER}") +target_link_libraries(pam_network_manager_helper ${LIBNM_GLIB_LIBRARIES}) -add_executable(pam_wlan_test pam_wlan.c) -set_property(TARGET pam_wlan_test PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE;TEST") -set_property(TARGET pam_wlan_test PROPERTY COMPILE_FLAGS "-std=c99 -Wall") +add_executable(pam_network_manager_test pam_network_manager.c) +set_property(TARGET pam_network_manager_test PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE;TEST") +set_property(TARGET pam_network_manager_test PROPERTY COMPILE_FLAGS "-std=c99 -Wall") -add_library(pam_wlan MODULE pam_wlan.c) -set_property(TARGET pam_wlan PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE") -set_property(TARGET pam_wlan PROPERTY COMPILE_FLAGS "-std=c99 -Wall") -set_property(TARGET pam_wlan PROPERTY PREFIX "") +add_library(pam_network_manager MODULE pam_network_manager.c) +set_property(TARGET pam_network_manager PROPERTY COMPILE_DEFINITIONS "_DEFAULT_SOURCE;_BSD_SOURCE") +set_property(TARGET pam_network_manager PROPERTY COMPILE_FLAGS "-std=c99 -Wall") +set_property(TARGET pam_network_manager PROPERTY PREFIX "") -install(TARGETS pam_wlan pam_wlan_helper - RUNTIME DESTINATION "${PAM_WLAN_HELPER_DIR}" +install(TARGETS pam_network_manager pam_network_manager_helper + RUNTIME DESTINATION "${PAM_NETWORK_MANAGER_HELPER_DIR}" LIBRARY DESTINATION "${PAM_MODULE_DIR}" ) diff --git a/config.h.in b/config.h.in index 6c83480..a0ab8bc 100644 --- a/config.h.in +++ b/config.h.in @@ -28,7 +28,7 @@ #pragma once -#define PAM_WLAN_HELPER "@PAM_WLAN_HELPER_DIR@/pam_wlan_helper" +#define PAM_NETWORK_MANAGER_HELPER "@PAM_NETWORK_MANAGER_HELPER_DIR@/pam_network_manager_helper" #define CONNECTION_TIMEOUT @CONNECTION_TIMEOUT@ diff --git a/pam_wlan.c b/pam_network_manager.c index 3fed59d..15a2f3c 100644 --- a/pam_wlan.c +++ b/pam_network_manager.c @@ -51,7 +51,7 @@ static int authenticate(const char *user, const char *pass) { - FILE *stream = popen(PAM_WLAN_HELPER, "we"); + FILE *stream = popen(PAM_NETWORK_MANAGER_HELPER, "we"); fputs(user, stream); fputc(0, stream); @@ -69,7 +69,7 @@ static int authenticate(const char *user, const char *pass) { int main(int argc, char *argv[]) { if (argc != 2) { - fprintf(stderr, "Usage: pam_wlan_test <user>\n"); + fprintf(stderr, "Usage: pam_network_manager_test <user>\n"); return 1; } diff --git a/pam_wlan_helper.c b/pam_network_manager_helper.c index 7043ade..7043ade 100644 --- a/pam_wlan_helper.c +++ b/pam_network_manager_helper.c |