mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
merge from 2.2
This commit is contained in:
parent
4f887f01e5
commit
5b28a7c59c
@ -55,6 +55,7 @@ struct ldap_enum_info {
|
||||
LDAP *ldap_struct;
|
||||
LDAPMessage *result;
|
||||
LDAPMessage *entry;
|
||||
int index;
|
||||
};
|
||||
|
||||
static struct ldap_enum_info global_ldap_ent;
|
||||
@ -706,6 +707,7 @@ BOOL pdb_setsampwent(BOOL update)
|
||||
|
||||
global_ldap_ent.entry = ldap_first_entry(global_ldap_ent.ldap_struct,
|
||||
global_ldap_ent.result);
|
||||
global_ldap_ent.index = -1;
|
||||
|
||||
return True;
|
||||
}
|
||||
@ -732,8 +734,11 @@ BOOL pdb_getsampwent(SAM_ACCOUNT * user)
|
||||
if (!global_ldap_ent.entry)
|
||||
return False;
|
||||
|
||||
global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct,
|
||||
global_ldap_ent.entry);
|
||||
global_ldap_ent.index++;
|
||||
if (global_ldap_ent.index > 0)
|
||||
{
|
||||
global_ldap_ent.entry = ldap_next_entry(global_ldap_ent.ldap_struct, global_ldap_ent.entry);
|
||||
}
|
||||
|
||||
if (global_ldap_ent.entry != NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user