1
Only store authtok if conversion function returned success.
3
Index: libpam-mount-1.36/src/pam_mount.c
4
===================================================================
5
--- libpam-mount-1.36.orig/src/pam_mount.c 2010-04-21 21:37:31.000000000 +0200
6
+++ libpam-mount-1.36/src/pam_mount.c 2010-04-21 21:37:56.000000000 +0200
7
@@ -472,9 +472,8 @@ static char *ses_grab_authtok(pam_handle
8
ret = read_password(pamh, Config.msg_sessionpw, &authtok);
9
if (ret != PAM_SUCCESS)
10
l0g("warning: could not obtain password "
11
- "interactively either\n");
13
- if (authtok != NULL) {
14
+ "interactively either\n");
16
ret = pam_set_data(pamh, "pam_mount_system_authtok",
17
authtok, clean_system_authtok);
18
if (ret == PAM_SUCCESS) {
19
@@ -482,7 +481,8 @@ static char *ses_grab_authtok(pam_handle
20
w4rn("mlock authtok: %s\n", strerror(errno));
22
l0g("error trying to save authtok for session code\n");
28
* Always proceed, even if there is no password. Some volumes may not