I’ve been experiencing segfaults while testing group mapping with the PAM user mapping module. I’ve
been using https://mariadb.com/blog/configuring-pam-group-mapping-mariadb as a guide and most of
the configuration is similar to what is outlined there except that I have two groups “dba” and “dba_ro”.
With this configuration when attempting to authenticate with a user that is not in the “dba” group a
segfault will occur as the loop at line 82 of pam_user_map.c never terminates. Even if the user is a member of the “dba_ro” group the crash will occur while matching
line 1 of /etc/security/user_map.conf.