summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2000-09-05 04:55:04 +0000
committerAndrew G. Morgan <morgan@kernel.org>2000-09-05 04:55:04 +0000
commite70c9f1088db23f6a3f8fc911df014f3b45b8173 (patch)
treee1638fb7bdcadfee08ed4dc615829ae5bcc90637 /modules
parent492714be0cba3a83c49150a7a219aeb5510df4b1 (diff)
Relevant BUGIDs: 113596
Purpose of commit: bugfix Commit summary: --------------- The "likeauth" module argument did not work for pam_pwdb and pam_unix. This commit fixes it.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_pwdb/pam_pwdb.c5
-rw-r--r--modules/pam_unix/pam_unix_auth.c6
2 files changed, 4 insertions, 7 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));
}
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);