summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-01-20 15:10:39 +0100
committerSergei Golubchik <serg@mariadb.org>2020-01-21 10:56:47 +0100
commit8870f18e1df8774b76c30792f6c7bf04230f2a58 (patch)
tree0b2c8231797e53f2aceec09e9404705023c0a959 /plugin
parent42049f9d397b1e82d7ba5de8ac01acea537b0924 (diff)
downloadmariadb-git-8870f18e1df8774b76c30792f6c7bf04230f2a58.tar.gz
MDEV-17292 Package the pam_user_map module
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_pam/CMakeLists.txt10
-rw-r--r--plugin/auth_pam/mapper/user_map.conf13
2 files changed, 23 insertions, 0 deletions
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index 606fef002e7..0efb0b07feb 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -10,5 +10,15 @@ IF(HAVE_PAM_APPL_H)
ENDIF(HAVE_STRNDUP)
FIND_LIBRARY(PAM_LIBRARY pam)
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
+
+ IF(TARGET auth_pam)
+ ADD_LIBRARY(pam_user_map MODULE mapper/pam_user_map.c)
+ TARGET_LINK_LIBRARIES(pam_user_map pam)
+ SET_TARGET_PROPERTIES (pam_user_map PROPERTIES PREFIX "")
+ IF(INSTALL_PAMDIR)
+ INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server)
+ INSTALL(FILES mapper/user_map.conf DESTINATION /etc/security COMPONENT Server)
+ ENDIF()
+ ENDIF()
ENDIF(HAVE_PAM_APPL_H)
diff --git a/plugin/auth_pam/mapper/user_map.conf b/plugin/auth_pam/mapper/user_map.conf
new file mode 100644
index 00000000000..4af8fb0fe10
--- /dev/null
+++ b/plugin/auth_pam/mapper/user_map.conf
@@ -0,0 +1,13 @@
+#
+# Configuration file for pam_user_map.so
+#
+# defines mapping in the form
+#
+# orig_user_name: mapped_user_name
+#
+# or (to map all users in a specific group)
+#
+# @group_name: mapped_user_name
+#
+# comments and empty lines are ignored
+#