diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-11 21:11:02 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-11 21:11:02 +0100 |
commit | 9d30bfb1981410649a5a152bee8627472a202608 (patch) | |
tree | 474bb05bebfb5fde5983a882ec831128fef65710 | |
parent | b811fd142320ac796d3236a5db9c5f78494db8b0 (diff) |
return correct kind of error code from try_pwmod() (r1313 from trunk)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.7@1321 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/pam.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nslcd/pam.c b/nslcd/pam.c index 0f140be..e222219 100644 --- a/nslcd/pam.c +++ b/nslcd/pam.c @@ -392,6 +392,7 @@ int nslcd_pam_sess_c(TFILE *fp,MYLDAP_SESSION *session) return 0; } +/* perform an LDAP password modification, returns an LDAP status code */ static int try_pwmod(const char *binddn,const char *userdn, const char *oldpassword,const char *newpassword) { @@ -401,7 +402,7 @@ static int try_pwmod(const char *binddn,const char *userdn, /* set up a new connection */ session=myldap_create_session(); if (session==NULL) - return NSLCD_PAM_AUTH_ERR; + return LDAP_UNAVAILABLE; /* set up credentials for the session */ myldap_set_credentials(session,binddn,oldpassword); /* perform search for own object (just to do any kind of search) */ |