summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/pdb_ldap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index ef88c09efa..5f5d75c6f5 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1701,18 +1701,20 @@ static NTSTATUS ldapsam_next_rid(struct ldapsam_privates *ldap_state, uint32 *ri
switch (rid_type) {
case USER_RID_TYPE:
- if (!get_single_attribute(ldap_state->ldap_struct,
- entry, "nextUserRid",
- old_rid_string)) {
+ if (!get_single_attribute(ldap_state->ldap_struct, entry,
+ get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_GROUPRID),
+ old_rid_string))
+ {
ldap_memfree(dn);
ldap_msgfree(result);
return ret;
}
break;
case GROUP_RID_TYPE:
- if (!get_single_attribute(ldap_state->ldap_struct,
- entry, "nextGroupRid",
- old_rid_string)) {
+ if (!get_single_attribute(ldap_state->ldap_struct, entry,
+ get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_GROUPRID),
+ old_rid_string))
+ {
ldap_memfree(dn);
ldap_msgfree(result);
return ret;