PAM code cleanup & refactor

Divided functionality into classes, fixed comments +
various other cleanup. BackenAuth no longer increments
sequence on sending password. SQLite busy timeout shortened
to 1 second.
This commit is contained in:
Esa Korhonen
2017-07-21 11:53:40 +03:00
parent f916b74c2e
commit 7488129afc
17 changed files with 1079 additions and 825 deletions

19
cmake/FindPAM.cmake Normal file
View File

@ -0,0 +1,19 @@
# This CMake-file locates PAM libraries on the system
#
# The following variables are set:
# PAM_FOUND - If the PAM library was found
# PAM_LIBRARIES - Path to the library
# PAM_INCLUDE_DIR - Path to headers
find_path(PAM_INCLUDE_DIR pam_appl.h PATH_SUFFIXES security)
find_library(PAM_LIBRARIES NAMES pam)
message(STATUS "Found PAM include dirs: ${PAM_INCLUDE_DIR}")
if (PAM_INCLUDE_DIR AND PAM_LIBRARIES)
message(STATUS "Found PAM: ${PAM_LIBRARIES}")
set(PAM_FOUND TRUE BOOL)
else()
message(STATUS "PAM libraries not found")
set(PAM_FOUND FALSE BOOL)
endif()