← Back to team overview

maria-discuss team mailing list archive

Re: pam plugin does't compile on FreeBSD


Hi, geoffroy!

On Jan 04, geoffroy desvernay wrote:
> Hi everyone,
> I'm mariadb's port maintainer for FreeBSD, and I'd like to get it 
> compile before pushing the 5.2.10 update...
> Seems to be the same problem than under OSX: (with openpam)
> Sergei Golubchik wrote 'Fixed' in the referenced mail, but I don't know 
> if it's fixed by removing pam support for OSX or ? (did not find any 
> difference in bzr branch 5.2)

I haven't pushed yet.
The fix was to rename pam_info (as it conflicted with openpam).

> Should I disable pam support for FreeBSD or is there any patch I could 
> include in the port for 5.2.10 ?

This is the complete patch:

=== modified file 'plugin/auth_pam/auth_pam.c'
--- a/plugin/auth_pam/auth_pam.c        2012-01-03 14:13:36 +0000
+++ b/plugin/auth_pam/auth_pam.c        2012-01-09 15:53:13 +0000
@@ -104,7 +104,7 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vi
   return status == PAM_SUCCESS ? CR_OK : CR_ERROR;
-static struct st_mysql_auth pam_info =
+static struct st_mysql_auth info =
@@ -114,7 +114,7 @@ static struct st_mysql_auth pam_info =
-  &pam_info,
+  &info,
   "Sergei Golubchik",
   "PAM based authentication",

I did not test it on FreeBSD, but I've installed openpam on linux and
verified that mariadb builds fine with openpam and this patch (and does
not build without the patch).


Follow ups