Commit 8870f18e authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-17292 Package the pam_user_map module

parent 42049f9d
......@@ -100,8 +100,11 @@ SET(ignored
"%ignore /etc"
"%ignore /etc/init.d"
"%ignore /etc/logrotate.d"
"%ignore /etc/security"
"%ignore /etc/systemd"
"%ignore /etc/systemd/system"
"%ignore /lib"
"%ignore /lib/security"
"%ignore ${CMAKE_INSTALL_PREFIX}"
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
......
......@@ -163,6 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock"
SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system")
SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d")
SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")
SET(INSTALL_PAMDIR_RPM "/lib/security")
#
# DEB layout
......@@ -195,6 +196,11 @@ SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock")
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system")
SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d")
SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(INSTALL_PAMDIR_DEB "/lib/x86_64-linux-gnu/security")
ELSE()
SET(INSTALL_PAMDIR_DEB "/lib/i386-linux-gnu/security")
ENDIF()
#
# SVR4 layout
......
......@@ -3,7 +3,9 @@ debian/additions/debian-start.inc.sh usr/share/mysql
debian/additions/echo_stderr usr/share/mysql
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
etc/apparmor.d/usr.sbin.mysqld
etc/security/user_map.conf
lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
lib/*/security/pam_user_map.so
usr/bin/aria_chk
usr/bin/aria_dump_log
usr/bin/aria_ftdump
......
......@@ -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)
#
# 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
#
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment