Fix PAM definition file and patching