diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2009-06-29 21:10:00 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2009-06-29 21:10:00 +0200 |
commit | da82572d4d5b225b4bb60fd7766cf78e00d3b14e (patch) | |
tree | f386a63b808814b278608bf51bbb6c40c0c041c7 /nslcd | |
parent | 1442aff11720d41c88464173715ce0a443a10f87 (diff) |
fix off by one error in the maximum number of uidNumber attributes in an LDAP entry (thanks to David Binderman for finding this)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@956 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd')
-rw-r--r-- | nslcd/passwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c index 3896aea..5ee0921 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -341,7 +341,7 @@ static int write_passwd(TFILE *fp,MYLDAP_ENTRY *entry,const char *requser, myldap_get_dn(entry),attmap_passwd_uidNumber); return 0; } - for (numuids=0;(numuids<=MAXUIDS_PER_ENTRY)&&(tmpvalues[numuids]!=NULL);numuids++) + for (numuids=0;(numuids<MAXUIDS_PER_ENTRY)&&(tmpvalues[numuids]!=NULL);numuids++) { uids[numuids]=(uid_t)strtol(tmpvalues[numuids],&tmp,0); if ((*(tmpvalues[numuids])=='\0')||(*tmp!='\0')) |