sys-libs/libcap-0.22 installs: /usr/lib64/security/pam_cap.so while PAM only looks for its modules in /lib*/security. Thus, the module is unreachable if referred from pam.d file just as 'pam_cap.so'.
that's not happening over here. please post full build logs and emerge info as attachments like a normal bug report. $ USE=pam ebuild libcap-2.22.ebuild install $ tree /var/tmp/portage/sys-libs/libcap-2.22/image/lib64/ /var/tmp/portage/sys-libs/libcap-2.22/image/lib64/ |-- libcap.so.2 -> libcap.so.2.22 |-- libcap.so.2.22 `-- security `-- pam_cap.so $ tree /var/tmp/portage/sys-libs/libcap-2.22/image/usr/lib64/ /var/tmp/portage/sys-libs/libcap-2.22/image/usr/lib64/ |-- libcap.a `-- libcap.so
Hmm, weird thing. It seems that 'qlist libcap' lists the pam_cap.so installed both in /lib64/security and /usr/lib64/security. Emerging it again removed the /usr copy; maybe it was fixed earlier without a revision bump.