summaryrefslogtreecommitdiff
path: root/modules/pam_pwdb
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_pwdb')
-rw-r--r--modules/pam_pwdb/pam_pwdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/pam_pwdb/pam_pwdb.c b/modules/pam_pwdb/pam_pwdb.c
index 68ca68fd..4d335572 100644
--- a/modules/pam_pwdb/pam_pwdb.c
+++ b/modules/pam_pwdb/pam_pwdb.c
@@ -83,7 +83,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags
if ( on(UNIX_LIKE_AUTH, ctrl) ) {
D(("recording return code for next time [%d]", retval));
- pam_set_data(pamh, "pwdb_setcred_return", (void *) &retval, NULL);
+ pam_set_data(pamh, "pwdb_setcred_return", (void *) retval, NULL);
}
D(("done. [%s]", pam_strerror(pamh, retval)));
@@ -108,8 +108,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags
int *pretval = &retval;
D(("recovering return code from auth call"));
- pam_get_data(pamh, "pwdb_setcred_return", (const void **) &pretval);
- pam_set_data(pamh, "pwdb_setcred_return", NULL, NULL);
+ pam_get_data(pamh, "pwdb_setcred_return", (const void **) pretval);
D(("recovered data indicates that old retval was %d", retval));
}