diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/openpam/lib/pam_acct_mgmt.c | 8 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_authenticate.c | 8 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_chauthtok.c | 12 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_close_session.c | 6 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_get_authtok.c | 5 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_get_user.c | 5 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_open_session.c | 6 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_setcred.c | 6 |
8 files changed, 32 insertions, 24 deletions
diff --git a/contrib/openpam/lib/pam_acct_mgmt.c b/contrib/openpam/lib/pam_acct_mgmt.c index 4adfe53..6dbd29a 100644 --- a/contrib/openpam/lib/pam_acct_mgmt.c +++ b/contrib/openpam/lib/pam_acct_mgmt.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_acct_mgmt.c#10 $ + * $P4: //depot/projects/openpam/lib/pam_acct_mgmt.c#11 $ */ #include <sys/param.h> @@ -51,11 +51,11 @@ int pam_acct_mgmt(pam_handle_t *pamh, int flags) { - int pam_err; + int r; ENTER(); - pam_err = openpam_dispatch(pamh, PAM_SM_ACCT_MGMT, flags); - RETURNC(pam_err); + r = openpam_dispatch(pamh, PAM_SM_ACCT_MGMT, flags); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_authenticate.c b/contrib/openpam/lib/pam_authenticate.c index f2884f7..6d319b9 100644 --- a/contrib/openpam/lib/pam_authenticate.c +++ b/contrib/openpam/lib/pam_authenticate.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_authenticate.c#12 $ + * $P4: //depot/projects/openpam/lib/pam_authenticate.c#13 $ */ #include <sys/param.h> @@ -51,14 +51,14 @@ int pam_authenticate(pam_handle_t *pamh, int flags) { - int pam_err; + int r; ENTER(); if (flags & ~(PAM_SILENT|PAM_DISALLOW_NULL_AUTHTOK)) RETURNC(PAM_SYMBOL_ERR); - pam_err = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags); + r = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags); pam_set_item(pamh, PAM_AUTHTOK, NULL); - RETURNC(pam_err); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_chauthtok.c b/contrib/openpam/lib/pam_chauthtok.c index 68fa483..74f2af3 100644 --- a/contrib/openpam/lib/pam_chauthtok.c +++ b/contrib/openpam/lib/pam_chauthtok.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#13 $ + * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#14 $ */ #include <sys/param.h> @@ -51,19 +51,19 @@ int pam_chauthtok(pam_handle_t *pamh, int flags) { - int pam_err; + int r; ENTER(); if (flags & ~(PAM_SILENT|PAM_CHANGE_EXPIRED_AUTHTOK)) RETURNC(PAM_SYMBOL_ERR); - pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, + r = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, flags | PAM_PRELIM_CHECK); - if (pam_err == PAM_SUCCESS) - pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, + if (r == PAM_SUCCESS) + r = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, flags | PAM_UPDATE_AUTHTOK); pam_set_item(pamh, PAM_OLDAUTHTOK, NULL); pam_set_item(pamh, PAM_AUTHTOK, NULL); - RETURNC(pam_err); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_close_session.c b/contrib/openpam/lib/pam_close_session.c index 9c6276c..5fd14ad 100644 --- a/contrib/openpam/lib/pam_close_session.c +++ b/contrib/openpam/lib/pam_close_session.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_close_session.c#10 $ + * $P4: //depot/projects/openpam/lib/pam_close_session.c#11 $ */ #include <sys/param.h> @@ -51,11 +51,13 @@ int pam_close_session(pam_handle_t *pamh, int flags) { + int r; ENTER(); if (flags & ~(PAM_SILENT)) RETURNC(PAM_SYMBOL_ERR); - RETURNC(openpam_dispatch(pamh, PAM_SM_CLOSE_SESSION, flags)); + r = openpam_dispatch(pamh, PAM_SM_CLOSE_SESSION, flags); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c index 896f059..c1ecb3c 100644 --- a/contrib/openpam/lib/pam_get_authtok.c +++ b/contrib/openpam/lib/pam_get_authtok.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#20 $ + * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#21 $ */ #include <sys/param.h> @@ -124,7 +124,8 @@ pam_get_authtok(pam_handle_t *pamh, free(resp); if (r != PAM_SUCCESS) RETURNC(r); - RETURNC(pam_get_item(pamh, item, (const void **)authtok)); + r = pam_get_item(pamh, item, (const void **)authtok); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_get_user.c b/contrib/openpam/lib/pam_get_user.c index f35a887..5681c53 100644 --- a/contrib/openpam/lib/pam_get_user.c +++ b/contrib/openpam/lib/pam_get_user.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_user.c#13 $ + * $P4: //depot/projects/openpam/lib/pam_get_user.c#14 $ */ #include <sys/param.h> @@ -78,7 +78,8 @@ pam_get_user(pam_handle_t *pamh, free(resp); if (r != PAM_SUCCESS) RETURNC(r); - RETURNC(pam_get_item(pamh, PAM_USER, (const void **)user)); + r = pam_get_item(pamh, PAM_USER, (const void **)user); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_open_session.c b/contrib/openpam/lib/pam_open_session.c index 508ad5c..02c9444 100644 --- a/contrib/openpam/lib/pam_open_session.c +++ b/contrib/openpam/lib/pam_open_session.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_open_session.c#10 $ + * $P4: //depot/projects/openpam/lib/pam_open_session.c#11 $ */ #include <sys/param.h> @@ -51,11 +51,13 @@ int pam_open_session(pam_handle_t *pamh, int flags) { + int r; ENTER(); if (flags & ~(PAM_SILENT)) RETURNC(PAM_SYMBOL_ERR); - RETURNC(openpam_dispatch(pamh, PAM_SM_OPEN_SESSION, flags)); + r = openpam_dispatch(pamh, PAM_SM_OPEN_SESSION, flags); + RETURNC(r); } /* diff --git a/contrib/openpam/lib/pam_setcred.c b/contrib/openpam/lib/pam_setcred.c index 1684880..b895e6a 100644 --- a/contrib/openpam/lib/pam_setcred.c +++ b/contrib/openpam/lib/pam_setcred.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_setcred.c#11 $ + * $P4: //depot/projects/openpam/lib/pam_setcred.c#12 $ */ #include <sys/param.h> @@ -51,13 +51,15 @@ int pam_setcred(pam_handle_t *pamh, int flags) { + int r; ENTER(); if (flags & ~(PAM_SILENT|PAM_ESTABLISH_CRED|PAM_DELETE_CRED| PAM_REINITIALIZE_CRED|PAM_REFRESH_CRED)) RETURNC(PAM_SYMBOL_ERR); /* XXX enforce exclusivity */ - RETURNC(openpam_dispatch(pamh, PAM_SM_SETCRED, flags)); + r = openpam_dispatch(pamh, PAM_SM_SETCRED, flags); + RETURNC(r); } /* |