[MDEV-21592] Build broken on OpenPAM systems Created: 2020-01-29  Updated: 2020-04-20  Resolved: 2020-04-20

Status: Closed
Project: MariaDB Server
Component/s: Plugin - pam
Affects Version/s: 10.4.12
Fix Version/s: 10.4.13

Type: Bug Priority: Blocker
Reporter: Bernard Spil Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: None
Environment:

FreeBSD 12.1 & 11.3 both amd64 & i386


Issue Links:
Blocks
blocks MDEV-21817 Undefined symbols for architecture x8... Closed

 Description   

Build logs

Error

https://brnrd.eu/poudriere/data/113amd64-svn/2020-01-28_11h06m19s/logs/errors/mariadb104-server-10.4.12.log

Fixed by using the appropriate header for OpenPAM

--- plugin/auth_pam/mapper/pam_user_map.c.orig  2020-01-26 20:43:53 UTC
+++ plugin/auth_pam/mapper/pam_user_map.c
@@ -39,7 +39,11 @@ and usually end up in /var/log/secure file.
 #include <grp.h>
 #include <pwd.h>
 
+#ifdef __FreeBSD__
+#include <security/pam_appl.h>
+#elif
 #include <security/pam_ext.h>
+#endif
 #include <security/pam_modules.h>
 
 #define FILENAME "/etc/security/user_map.conf"



 Comments   
Comment by Sergei Golubchik [ 2020-01-29 ]

Thanks! It also fails on Mac OS X, so I presume #ifdef _FreeBSD_ will be not enough, but I can easily do a build-time detection based on your patch.

Comment by Andy [ 2020-02-04 ]

Also failing on illumos platforms, the same substitution works there
(the module is included based on HAVE_PAM_APPL_H so that probably need fixing up too)

Comment by Daniel Black [ 2020-04-04 ]

This commit https://github.com/MariaDB/server/commit/42b29d41335d in 10.5 might solve this.

Comment by Sergei Golubchik [ 2020-04-20 ]

I've built pam_user_map.so on FreeBSD — looks fine now, closing.

Generated at Thu Feb 08 09:08:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.