summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-10-31 12:57:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:40 -0500
commit2c14cf3b2b74c5696145efdfecb134e6091eee89 (patch)
treec28e16ac5a9cb439063b6dbb051ab28cf9697059 /source3
parentc101ce569d82caa74d17d7e1d08a67023aa88d5c (diff)
downloadsamba-2c14cf3b2b74c5696145efdfecb134e6091eee89.tar.gz
samba-2c14cf3b2b74c5696145efdfecb134e6091eee89.tar.bz2
samba-2c14cf3b2b74c5696145efdfecb134e6091eee89.zip
r19516: Fix the DN, to make searches using the domain as base
the DN must be rid,domain and not domain,rid Also use member and not memberOf for group members following conventions. (This used to be commit 7c0ea791d21d914e882b56a849766d966ce8ed1a)
Diffstat (limited to 'source3')
-rw-r--r--source3/groupdb/mapping_ldb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index 23b800a378..5d350e477c 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/groupdb/mapping_ldb.c
@@ -44,7 +44,7 @@ static BOOL mapping_upgrade(const char *tdb_path);
"dn: @INDEXLIST\n" \
"@IDXATTR: gidNumber\n" \
"@IDXATTR: ntName\n" \
- "@IDXATTR: memberOf\n" };
+ "@IDXATTR: member\n" };
const char *db_path, *tdb_path;
int ret;
int flags = 0;
@@ -121,8 +121,8 @@ static struct ldb_dn *mapping_dn(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
}
/* we split by domain and rid so we can do a subtree search
when we only want one domain */
- return ldb_dn_string_compose(mem_ctx, NULL, "domain=%s,rid=%u",
- string_sid, rid);
+ return ldb_dn_string_compose(mem_ctx, NULL, "rid=%u,domain=%s",
+ rid, string_sid);
}
/*
@@ -405,7 +405,7 @@ failed:
return NT_STATUS_INVALID_PARAMETER;
}
- expr = talloc_asprintf(ldb, "(&(memberOf=%s)(objectClass=groupMap))",
+ expr = talloc_asprintf(ldb, "(&(member=%s)(objectClass=groupMap))",
string_sid);
if (expr == NULL) goto failed;
@@ -439,7 +439,7 @@ failed:
}
/*
- add/remove a memberOf field
+ add/remove a member field
*/
static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member,
int operation)
@@ -479,7 +479,7 @@ static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member,
msg.num_elements = 1;
msg.elements = &el;
el.flags = operation;
- el.name = talloc_strdup(tmp_ctx, "memberOf");
+ el.name = talloc_strdup(tmp_ctx, "member");
el.num_values = 1;
el.values = &val;
sid_to_string(string_sid, member);
@@ -513,12 +513,12 @@ static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member,
/*
- enumerate sids that have the given alias set in memberOf
+ enumerate sids that have the given alias set in member
*/
NTSTATUS enum_aliasmem(const DOM_SID *alias, DOM_SID **sids, size_t *num)
{
const char *attrs[] = {
- "memberOf",
+ "member",
NULL
};
int ret, i;
@@ -549,7 +549,7 @@ static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- el = ldb_msg_find_element(res->msgs[0], "memberOf");
+ el = ldb_msg_find_element(res->msgs[0], "member");
if (el == NULL) {
talloc_free(dn);
return NT_STATUS_INTERNAL_DB_CORRUPTION;