aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-11-05 21:12:10 +0100
committerAndreas Schneider <asn@samba.org>2015-12-10 13:31:20 +0100
commitd633845a34a4ef6491f046e463e3d173e23e98c5 (patch)
tree5d4db1a5b9dff43951ddabd5ae40a4c8c9def4d0
parent904e9203f251b2c81d31ea8b49b1fe0d89b977cf (diff)
downloadpam_wrapper-d633845a34a4ef6491f046e463e3d173e23e98c5.tar.gz
pam_wrapper-d633845a34a4ef6491f046e463e3d173e23e98c5.tar.xz
pam_wrapper-d633845a34a4ef6491f046e463e3d173e23e98c5.zip
Improve build
-rw-r--r--src/modules/CMakeLists.txt26
-rw-r--r--tests/passdb_py3
-rw-r--r--tests/services/matrix_py.in4
-rw-r--r--tests/services/pwrap_get_set.in4
4 files changed, 35 insertions, 2 deletions
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
new file mode 100644
index 0000000..93ce522
--- /dev/null
+++ b/src/modules/CMakeLists.txt
@@ -0,0 +1,26 @@
+project(pam_wrapper-modules)
+
+set(PAM_MODULES pam_matrix pam_get_items pam_set_items)
+
+set(PAM_LIBRARIES pam)
+if (HAVE_PAM_MISC)
+ list(APPEND PAM_LIBRARIES pam_misc)
+endif (HAVE_PAM_MISC)
+
+set(PWRAP_PRIVATE_LIBRARIES
+ ${LIB_INSTALL_DIR}/pam_wrapper)
+
+foreach(_PAM_MODULE ${PAM_MODULES})
+ add_library(${_PAM_MODULE} MODULE ${_PAM_MODULE}.c)
+ set_property(TARGET ${_PAM_MODULE} PROPERTY PREFIX "")
+
+ target_link_libraries(${_PAM_MODULE}
+ ${PAM_LIBRARIES})
+
+ install(
+ TARGETS
+ ${_PAM_MODULE}
+ LIBRARY DESTINATION ${PWRAP_PRIVATE_LIBRARIES}
+ ARCHIVE DESTINATION ${PWRAP_PRIVATE_LIBRARIES})
+endforeach()
+
diff --git a/tests/passdb_py b/tests/passdb_py
new file mode 100644
index 0000000..6462711
--- /dev/null
+++ b/tests/passdb_py
@@ -0,0 +1,3 @@
+# The format is username:password:allowed_pam_svc
+neo:secret:matrix_py
+trinity:secret:matrix_py
diff --git a/tests/services/matrix_py.in b/tests/services/matrix_py.in
new file mode 100644
index 0000000..e9f2336
--- /dev/null
+++ b/tests/services/matrix_py.in
@@ -0,0 +1,4 @@
+auth required @PAM_MATRIX_PATH@ passdb=@PASSDB_PY_PATH@
+account required @PAM_MATRIX_PATH@ passdb=@PASSDB_PY_PATH@
+session required @PAM_MATRIX_PATH@ passdb=@PASSDB_PY_PATH@
+password required @PAM_MATRIX_PATH@ passdb=@PASSDB_PY_PATH@
diff --git a/tests/services/pwrap_get_set.in b/tests/services/pwrap_get_set.in
index 48809b9..767e476 100644
--- a/tests/services/pwrap_get_set.in
+++ b/tests/services/pwrap_get_set.in
@@ -1,2 +1,2 @@
-session required @CMAKE_CURRENT_BINARY_DIR@/../src/pam_set_items.so
-session required @CMAKE_CURRENT_BINARY_DIR@/../src/pam_get_items.so
+session required @CMAKE_CURRENT_BINARY_DIR@/../src/modules/pam_set_items.so
+session required @CMAKE_CURRENT_BINARY_DIR@/../src/modules/pam_get_items.so