File tree Expand file tree Collapse file tree
stemcell_builder/stages/password_policies Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,15 @@ patch -p1 $chroot/etc/pam.d/common-auth < $assets_dir/ubuntu/common-auth.patch
3333strip_trailing_whitespace_from $chroot /etc/pam.d/common-password
3434patch -p1 $chroot /etc/pam.d/common-password < $assets_dir /ubuntu/common-password.patch
3535
36+ # libpam-lastlog2 installs pam_lastlog2.so only to the multiarch path
37+ # (/usr/lib/x86_64-linux-gnu/security/) but PAM's securedir is /usr/lib/security/.
38+ # Bridge the gap so PAM can load the module referenced above.
39+ if [ -f " $chroot /usr/lib/x86_64-linux-gnu/security/pam_lastlog2.so" ] && \
40+ [ ! -e " $chroot /usr/lib/security/pam_lastlog2.so" ]; then
41+ ln -sf /usr/lib/x86_64-linux-gnu/security/pam_lastlog2.so \
42+ " $chroot /usr/lib/security/pam_lastlog2.so"
43+ fi
44+
3645strip_trailing_whitespace_from $chroot /etc/pam.d/login
3746patch $chroot /etc/pam.d/login < $assets_dir /ubuntu/login.patch
3847
You can’t perform that action at this time.
0 commit comments