From 9d30bfb1981410649a5a152bee8627472a202608 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 11 Dec 2010 20:11:02 +0000 Subject: 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 --- nslcd/pam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) */ -- cgit v1.2.3