diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2009-06-01 11:20:11 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2009-06-01 11:20:11 +0000 |
commit | d297d60fab7fa74ffd2614e96ed7778f6e0dedab (patch) | |
tree | 732c995483700f76f9a1a3ff7d87dcd18bce591e | |
parent | bdcce7051d298319e50e77602840f80e5f8d5c1f (diff) |
in uid2entry() also get the uid attribute because it may be needed by PAM
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@911 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/passwd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c index 69eb556..58bc8f3 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -254,14 +254,15 @@ MYLDAP_ENTRY *uid2entry(MYLDAP_SESSION *session,const char *uid) MYLDAP_ENTRY *entry=NULL; const char *base; int i; - static const char *attrs[1]; + static const char *attrs[2]; int rc; char filter[1024]; /* if it isn't a valid username, just bail out now */ if (!isvalidname(uid)) return NULL; - /* set up attributes (we don't care, we just want the DN) */ - attrs[0]=NULL; + /* set up attributes (we don't need much) */ + attrs[0]=attmap_passwd_uid; + attrs[1]=NULL; /* we have to look up the entry */ mkfilter_passwd_byname(uid,filter,sizeof(filter)); for (i=0;(i<NSS_LDAP_CONFIG_MAX_BASES)&&((base=passwd_bases[i])!=NULL);i++) |