d/p/031_pam_include: fix loading from /usr/share/pam (LP: #2087827)
In its previous form, the latter chunk changes the include mechanisms
(used for the 'include' and 'substack' controls) from a straight attempt
at loading tok through _pam_load_conf_file, to the following:
If tok is absolute path,
call _pam_load_conf_file($tok)
else if /etc/pam.d exists,
call _pam_load_conf_file(/etc/pam.d/$tok)
else fail
There already is similar logic in _pam_load_conf_file, except that before failing on a non-path token it also checks in /usr/share/pam. Our patch breaks that fallback by always passing an absolute path.
Instead, we let that part of the code intact, which gives us the bonus of supporting @include on files from /usr/share/pam as well!
Edited by Simon Chopin