--- src/pam_mount.c.orig 2010-02-04 22:38:13.952135654 -0600 +++ src/pam_mount.c 2010-02-04 22:42:24.996136619 -0600 @@ -457,7 +457,9 @@ ret = pam_set_data(pamh, "pam_mount_system_authtok", authtok, clean_system_authtok); if (ret == PAM_SUCCESS) { - if (mlock(authtok, strlen(authtok) + 1) < 0) + if (authtok == NULL) + w4rn("authtok is NULL in session code\n"); + else if (mlock(authtok, strlen(authtok) + 1) < 0) w4rn("mlock authtok: %s\n", strerror(errno)); } else { l0g("error trying to save authtok for session code\n");