nss-pam-ldapd commit: r1443 - nss-pam-ldapd/nslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1443 - nss-pam-ldapd/nslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1443 - nss-pam-ldapd/nslcd
- Date: Sat, 30 Apr 2011 10:12:20 +0200 (CEST)
Author: arthur
Date: Sat Apr 30 10:12:18 2011
New Revision: 1443
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1443
Log:
use the right DN in the pam_authz_search option
Modified:
nss-pam-ldapd/nslcd/pam.c
Modified: nss-pam-ldapd/nslcd/pam.c
==============================================================================
--- nss-pam-ldapd/nslcd/pam.c Sat Apr 30 10:00:12 2011 (r1442)
+++ nss-pam-ldapd/nslcd/pam.c Sat Apr 30 10:12:18 2011 (r1443)
@@ -268,9 +268,9 @@
}
/* perform an authorisation search, returns an LDAP status code */
-static int try_autzsearch(MYLDAP_SESSION *session,const char *username,
- const char *servicename,const char *ruser,
- const char *rhost,const char *tty)
+static int try_autzsearch(MYLDAP_SESSION *session,const char *dn,
+ const char *username,const char *servicename,
+ const char *ruser,const char *rhost,const char *tty)
{
char hostname[HOST_NAME_MAX+1];
const char *fqdn;
@@ -295,7 +295,7 @@
autzsearch_var_add(dict,"hostname",hostname);
if ((fqdn=getfqdn())!=NULL)
autzsearch_var_add(dict,"fqdn",fqdn);
- autzsearch_var_add(dict,"dn",myldap_get_dn(entry));
+ autzsearch_var_add(dict,"dn",dn);
autzsearch_var_add(dict,"uid",username);
/* build the search filter */
res=expr_parse(nslcd_cfg->ldc_pam_authz_search,
@@ -374,7 +374,7 @@
return -1;
}
/* check authorisation search */
- rc=try_autzsearch(session,username,servicename,ruser,rhost,tty);
+
rc=try_autzsearch(session,myldap_get_dn(entry),username,servicename,ruser,rhost,tty);
if (rc!=LDAP_SUCCESS)
{
WRITE_INT32(fp,NSLCD_RESULT_BEGIN);
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1443 - nss-pam-ldapd/nslcd,
Commits of the nss-pam-ldapd project