|Summary:||sys-auth/pam-pgsql - src/backend_pgsql.c: ?|
|Product:||Gentoo Linux||Reporter:||Olipro <olipro+gentoopub>|
|Component:||Current packages||Assignee:||No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>|
|Package list:||Runtime testing required:||---|
Description Olipro 2019-10-23 16:48:26 UTC
pam-pgsql now crashes due to the crypt() function no longer being defined within the set of includes in backend_pgsql.c - most likely due to changes in the newer glibc. The issue can be fixed by adding #include <crypt.h> to backend_pgsql.c
Comment 1 Jeroen Roovers (RETIRED) 2019-10-24 05:57:15 UTC
(In reply to Olipro from comment #0) > pam-pgsql now crashes due to the crypt() function no longer being defined > within the set of includes in backend_pgsql.c - most likely due to changes > in the newer glibc. > > The issue can be fixed by adding #include <crypt.h> to backend_pgsql.c It looks like you are describing a problem with compiling sys-auth/pam-pgsql, so please attach the entire build log to this bug report. Also, post your `emerge --info' output in a comment.
Comment 2 Jeroen Roovers (RETIRED) 2019-10-24 07:08:39 UTC
crypt(3) says: SYNOPSIS #define _XOPEN_SOURCE /* See feature_test_macros(7) */ #include <unistd.h> char *crypt(const char *key, const char *salt); src/backend_pgsql.c appears to get this right: it defines _XOPEN_SOURCE and it includes unistd.h. According to the manual, crypt.h only needs to be included to use crypt_r.
Comment 3 Olipro 2019-10-27 08:05:50 UTC
I submitted a pull request upstream which fixes the issue: https://github.com/pam-pgsql/pam-pgsql/pull/14/commits/789f62209c577ffb9f7d7f5a386d945a99c6abc6
Comment 4 Olipro 2020-04-14 10:44:13 UTC
I built out a new system the other day and the plugin is basically unusable. I suggest either updating the package to take a new version from the GitHub repo as they merged my fix. Alternatively, you could apply my fix only as a standalone patch during the emerge.