@ -366,6 +366,7 @@ CMAKE_OPTIONS += \
-DINSTALL_MANDIR= share/man \
-DINSTALL_MANDIR= share/man \
-DINSTALL_MYSQLSHAREDIR= share/mariadb \
-DINSTALL_MYSQLSHAREDIR= share/mariadb \
-DINSTALL_MYSQLTESTDIR= "" \
-DINSTALL_MYSQLTESTDIR= "" \
-DINSTALL_PAMDIR= "/lib/security" \
-DINSTALL_PLUGINDIR= lib/mariadb/plugin \
-DINSTALL_PLUGINDIR= lib/mariadb/plugin \
-DINSTALL_SBINDIR= bin \
-DINSTALL_SBINDIR= bin \
-DINSTALL_SCRIPTDIR= bin \
-DINSTALL_SCRIPTDIR= bin \
@ -544,8 +545,18 @@ This package provides the $(1) plugin.
$( INSTALL_DIR) $$ ( 1) $( PLUGIN_DIR)
$( INSTALL_DIR) $$ ( 1) $( PLUGIN_DIR)
$( call Package/mariadb/install/plugin,$$ ( 1) ,$( 1) )
$( call Package/mariadb/install/plugin,$$ ( 1) ,$( 1) )
i f e q ( $( 1) , a u t h _ p a m )
i f e q ( $( 1) , a u t h _ p a m )
$( CP) $( PKG_INSTALL_DIR) $( PLUGIN_DIR) /auth_pam_tool_dir \
$$ ( 1) $( PLUGIN_DIR)
$( INSTALL_DIR) -m0750 $$ ( 1) $( PLUGIN_DIR) /auth_pam_tool_dir
$( INSTALL_SUID) \
$( PKG_INSTALL_DIR) $( PLUGIN_DIR) /auth_pam_tool_dir/auth_pam_tool \
$$ ( 1) $( PLUGIN_DIR) /auth_pam_tool_dir
$( INSTALL_DIR) $$ ( 1) /etc/security
$( INSTALL_DATA) \
$( PKG_INSTALL_DIR) /etc/security/user_map.conf \
$$ ( 1) /etc/security
$( INSTALL_DIR) $$ ( 1) /lib/security
$( INSTALL_DATA) \
$( PKG_INSTALL_DIR) /lib/security/pam_user_map.so \
$$ ( 1) /lib/security
e n d i f
e n d i f
i f e q ( $( 1) , h a _ s p i d e r )
i f e q ( $( 1) , h a _ s p i d e r )
$( INSTALL_DIR) $$ ( 1) $( SHARE_DIR)
$( INSTALL_DIR) $$ ( 1) $( SHARE_DIR)
@ -556,11 +567,18 @@ endif
$$ ( eval $$ ( call BuildPackage,mariadb-server-plugin-$( subst _,-,$( 1) ) ) )
$$ ( eval $$ ( call BuildPackage,mariadb-server-plugin-$( subst _,-,$( 1) ) ) )
e n d e f
e n d e f
# Directory "auth_pam_tool_dir" is installed with '-m0750' above and
# contains SUID binary "auth_pam_tool". Below post-install script
# changes the group of "auth_pam_tool_dir" to mariadb, so user mariadb
# can access the folder (and the SUID binary). The script only changes
# the group if the directory is currently owned by "root:root".
d e f i n e P a c k a g e / m a r i a d b - s e r v e r - p l u g i n - a u t h - p a m / p o s t i n s t
d e f i n e P a c k a g e / m a r i a d b - s e r v e r - p l u g i n - a u t h - p a m / p o s t i n s t
#!/bin/sh
#!/bin/sh
i f [ - z "$${IPKG_INSTROOT}" ] ; t h e n
i f [ - z "$${IPKG_INSTROOT}" ] ; t h e n
chown root:mariadb /usr/lib/mariadb/plugin/auth_pam_tool_dir > /dev/null 2>& 1
chmod 0750 /usr/lib/mariadb/plugin/auth_pam_tool_dir > /dev/null 2>& 1
dir = "/usr/lib/mariadb/plugin/auth_pam_tool_dir"
if ! [ -L " $$ dir " ] && [ -d " $$ dir " ] && [ -O " $$ dir " ] && [ -G " $$ dir " ] ; then
chown :mariadb " $$ dir "
fi
f i
f i
e x i t 0
e x i t 0
e n d e f
e n d e f