[Maria-discuss] pam plugin does't compile on FreeBSD
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) https://lists.launchpad.net/maria-discuss/msg00506.html Under FreeBSD 9.0RC3 (and 8.2) amd64: libtool: compile: cc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I/usr/local/include -DMYSQL_DYNAMIC_PLUGIN -O2 -pipe -fno-strict-aliasing -MT auth_pam_la-auth_pam.lo -MD -MP -MF .deps/auth_pam_la-auth_pam.Tpo -c auth_pam.c -fPIC -DPIC -o .libs/auth_pam_la-auth_pam.o auth_pam.c:107: error: 'pam_info' redeclared as different kind of symbol /usr/include/security/openpam.h:102: error: previous declaration of 'pam_info' was here *** Error code 1 1 error *** Error code 1 1 error *** Error code 1 1 error *** Error code 1 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) Should I disable pam support for FreeBSD or is there any patch I could include in the port for 5.2.10 ? Thanks, -- *Geoffroy Desvernay* C.R.I - Administration systèmes et réseaux Ecole Centrale de Marseille
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 = { MYSQL_AUTHENTICATION_INTERFACE_VERSION, "dialog", @@ -114,7 +114,7 @@ static struct st_mysql_auth pam_info = maria_declare_plugin(pam) { MYSQL_AUTHENTICATION_PLUGIN, - &pam_info, + &info, "pam", "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). Regards, Sergei
On 09.01.2012 16:55, Sergei Golubchik wrote:
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).
Thank you ! I found in the meanwhile that simply removing "#include <security/pam_modules.h>" from that file did the trick too (at least it permitted me to compile and use the pam_auth plugin successfully) - I pushed that horrible trick in the port for the moment, and I'll revert to your patch with next update, after testing it of course :) Yours, -- *geoffroy desvernay* C.R.I - Administration systèmes et réseaux Ecole Centrale de Marseille
participants (2)
-
geoffroy desvernay
-
Sergei Golubchik