Make WLAN configuration configurable
This commit is contained in:
parent
464a817a78
commit
2f6cbf0a54
4 changed files with 20 additions and 12 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1 @@
|
|||
*~
|
||||
pam_wlan.so
|
||||
pam_wlan_test
|
||||
|
|
|
@ -9,6 +9,15 @@ 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(CONNECTION_TIMEOUT "10" CACHE STRING "Connection timeout")
|
||||
set(CONNECTION_ID "" CACHE STRING "Connection ID")
|
||||
set(CONNECTION_UUID "" CACHE STRING "Connection UUID")
|
||||
set(CONNECTION_SSID "" CACHE STRING "Connection SSID")
|
||||
set(CONNECTION_AUTH_ALG "open" CACHE STRING "Connection authentication algorithm")
|
||||
set(CONNECTION_KEY_MGMT "wpa-eap" CACHE STRING "Connection key management method")
|
||||
set(CONNECTION_EAP "ttls" CACHE STRING "Connection EAP method")
|
||||
set(CONNECTION_PHASE2_AUTHEAP "mschapv2" CACHE STRING "Connection EAP phase2 authentication method")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${PAM_INCLUDE_DIR} ${LIBNM_GLIB_INCLUDE_DIRS})
|
||||
link_directories(${LIBNM_GLIB_LIBRARY_DIRS})
|
||||
|
||||
|
|
10
config.h.in
10
config.h.in
|
@ -29,3 +29,13 @@
|
|||
|
||||
|
||||
#define PAM_WLAN_HELPER "@PAM_WLAN_HELPER_DIR@/pam_wlan_helper"
|
||||
|
||||
|
||||
#define CONNECTION_TIMEOUT @CONNECTION_TIMEOUT@
|
||||
#define CONNECTION_ID "@CONNECTION_ID@"
|
||||
#define CONNECTION_UUID "@CONNECTION_UUID@"
|
||||
#define CONNECTION_SSID "@CONNECTION_SSID@"
|
||||
#define CONNECTION_AUTH_ALG "@CONNECTION_AUTH_ALG@"
|
||||
#define CONNECTION_KEY_MGMT "@CONNECTION_KEY_MGMT@"
|
||||
#define CONNECTION_EAP "@CONNECTION_EAP@"
|
||||
#define CONNECTION_PHASE2_AUTHEAP "@CONNECTION_PHASE2_AUTHEAP@"
|
||||
|
|
|
@ -46,16 +46,7 @@
|
|||
#include <nm-setting-ip4-config.h>
|
||||
#include <nm-setting-ip6-config.h>
|
||||
|
||||
|
||||
#define TIMEOUT 10
|
||||
#define CONNECTION_ID "UzL-Wlan"
|
||||
#define CONNECTION_UUID "af7b7f0b-3e09-442e-8841-f7d7482fa7b0"
|
||||
|
||||
#define CONNECTION_SSID "UzL-Wlan"
|
||||
#define CONNECTION_AUTH_ALG "open"
|
||||
#define CONNECTION_KEY_MGMT "wpa-eap"
|
||||
#define CONNECTION_EAP "ttls"
|
||||
#define CONNECTION_PHASE2_AUTHEAP "mschapv2"
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
|
Reference in a new issue