summaryrefslogtreecommitdiff
path: root/modules/pam_unix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_unix')
-rw-r--r--modules/pam_unix/pam_unix_auth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
index a16118d6..7c639d88 100644
--- a/modules/pam_unix/pam_unix_auth.c
+++ b/modules/pam_unix/pam_unix_auth.c
@@ -88,9 +88,8 @@
if (on(UNIX_LIKE_AUTH, ctrl) && ret_data) { \
D(("recording return code for next time [%d]", \
retval)); \
- *ret_data = retval; \
pam_set_data(pamh, "unix_setcred_return", \
- (void *) ret_data, NULL); \
+ (void *) retval, NULL); \
} \
D(("done. [%s]", pam_strerror(pamh, retval))); \
return retval; \
@@ -205,8 +204,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t * pamh, int flags
int *pretval = NULL;
D(("recovering return code from auth call"));
- pam_get_data(pamh, "unix_setcred_return", (const void **) &pretval);
- pam_set_data(pamh, "unix_setcred_return", NULL, NULL);
+ pam_get_data(pamh, "unix_setcred_return", (const void **) pretval);
if(pretval) {
retval = *pretval;
free(pretval);