From 5480a01ddfb7aa98188365ebf890c127946ef3d9 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Wed, 3 Jun 2009 08:03:14 +0000 Subject: remove trailing spaces git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@915 ef36b2f9-881f-0410-afb5-c4e39611909c --- pam/pam.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pam/pam.c b/pam/pam.c index 32f0a6c..06ce34c 100644 --- a/pam/pam.c +++ b/pam/pam.c @@ -417,16 +417,16 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh,int flags,int argc,const char **argv) rc=PAM_IGNORE; else if ((rc==PAM_USER_UNKNOWN)&&(ignore_flags&IGNORE_UNKNOWN)) rc=PAM_IGNORE; - if (rc!=PAM_SUCCESS) + if (rc!=PAM_SUCCESS) { if (rc!=PAM_IGNORE) pam_warn(appconv,"LDAP authorization failed",PAM_ERROR_MSG,no_warn); - } - else + } + else { if (ctx2.authzmsg && ctx2.authzmsg[0]) pam_warn(appconv,ctx2.authzmsg,PAM_TEXT_INFO,no_warn); - if (ctx2.authz==PAM_SUCCESS) + if (ctx2.authz==PAM_SUCCESS) { rc=ctx->authz; if (ctx->authzmsg && ctx->authzmsg[0]) @@ -627,12 +627,12 @@ int pam_sm_chauthtok( } } rc=pam_get_item(pamh,PAM_OLDAUTHTOK,&p); - if (rc) + if (rc) return rc; - } - else + } + else rc=PAM_SUCCESS; - if (!ctx->dn) + if (!ctx->dn) { rc=nslcd_request_pwmod(ctx,username,svc,p,NULL); if ((rc==PAM_AUTHINFO_UNAVAIL)&&(ignore_flags&IGNORE_UNAVAIL)) @@ -644,13 +644,13 @@ int pam_sm_chauthtok( } rc=pam_get_item(pamh,PAM_OLDAUTHTOK,&p); - if (rc) + if (rc) return rc; if (!p) p=ctx->oldpw; - if (first_pass) + if (first_pass) { rc=pam_get_item(pamh,PAM_AUTHTOK,&q); if ((rc!=PAM_SUCCESS || !q) && (first_pass & (USE_FIRST|USE_TOKEN))) { @@ -659,11 +659,11 @@ int pam_sm_chauthtok( return rc; } } - if (!q) + if (!q) { rc=pam_get_authtok(pamh, flags, "Enter new LDAP Password: ", "Retype new LDAP Password: ", &q); - if (rc==PAM_SUCCESS) + if (rc==PAM_SUCCESS) { pam_set_item(pamh,PAM_AUTHTOK,q); memset(q,0,strlen(q)); @@ -679,12 +679,12 @@ int pam_sm_chauthtok( else if ((rc==PAM_USER_UNKNOWN)&&(ignore_flags&IGNORE_UNKNOWN)) rc=PAM_IGNORE; p=NULL; q=NULL; - if (rc==PAM_SUCCESS) + if (rc==PAM_SUCCESS) { rc=ctx->authz; if (rc!=PAM_SUCCESS) pam_warn(appconv, ctx->authzmsg, PAM_ERROR_MSG, no_warn); - } + } else if (rc!=PAM_IGNORE) pam_warn(appconv, "LDAP pwmod failed", PAM_ERROR_MSG, no_warn); return rc; -- cgit v1.2.3