[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Sat Nov 6 14:09:01 MDT 2010
The branch, master has been updated
via acb8a8d s4:update_keytab LDB module - we don't need to search for the "distinguishedName" attribute
via a093e10 s4:operational LDB module - "canonicalName" doesn't make use of the "distinguishedName" attribute
via 1688b71 ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation
via 889fa1c ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"
from 9ff8428 s4:samr RPC server - "dcesrv_samr_RemoveMemberFromForeignDomain"
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit acb8a8d3304c8060e6039eac53a564d86331e264
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 20:23:35 2010 +0100
s4:update_keytab LDB module - we don't need to search for the "distinguishedName" attribute
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Sat Nov 6 20:08:28 UTC 2010 on sn-devel-104
commit a093e10896a4768dba0cd793a04b7d5d1366fee2
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 20:18:40 2010 +0100
s4:operational LDB module - "canonicalName" doesn't make use of the "distinguishedName" attribute
It uses the DN from the returned message
commit 1688b71ca4f762e61fde8c5f1bef9ceca6f694c9
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 19:46:42 2010 +0100
ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentation
commit 889fa1cac55b79a268dbbd63d836a0917b8a79a3
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Nov 6 19:38:47 2010 +0100
ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"
And remove in "ltdb_add_internal" a cache loading call which has been present
twice.
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/operational.c | 4 ++--
source4/dsdb/samdb/ldb_modules/update_keytab.c | 4 ++--
source4/lib/ldb/ldb_tdb/ldb_tdb.c | 16 ++++++----------
3 files changed, 10 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index 3151061..12edfc2 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -539,8 +539,8 @@ static const struct {
} search_sub[] = {
{ "createTimestamp", "whenCreated", NULL , NULL },
{ "modifyTimestamp", "whenChanged", NULL , NULL },
- { "structuralObjectClass", "objectClass", NULL , NULL },
- { "canonicalName", "distinguishedName", NULL , construct_canonical_name },
+ { "structuralObjectClass", NULL, NULL , NULL },
+ { "canonicalName", NULL, NULL , construct_canonical_name },
{ "primaryGroupToken", "objectClass", "objectSid", construct_primary_group_token },
{ "tokenGroups", "objectClass", NULL, construct_token_groups },
{ "parentGUID", NULL, NULL, construct_parent_guid },
diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c
index e39b260..6a9245f 100644
--- a/source4/dsdb/samdb/ldb_modules/update_keytab.c
+++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c
@@ -237,7 +237,7 @@ static int ukt_search_modified_callback(struct ldb_request *req,
static int ukt_search_modified(struct update_kt_ctx *ac)
{
struct ldb_context *ldb;
- static const char * const attrs[] = { "distinguishedName", NULL };
+ static const char * const no_attrs[] = { NULL };
struct ldb_request *search_req;
int ret;
@@ -246,7 +246,7 @@ static int ukt_search_modified(struct update_kt_ctx *ac)
ret = ldb_build_search_req(&search_req, ldb, ac,
ac->dn, LDB_SCOPE_BASE,
"(&(objectClass=kerberosSecret)"
- "(privateKeytab=*))", attrs,
+ "(privateKeytab=*))", no_attrs,
NULL,
ac, ukt_search_modified_callback,
ac->req);
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index a498d54..2e88989 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -175,7 +175,7 @@ failed:
currently only @ATTRIBUTES is checked
*/
static int ltdb_check_special_dn(struct ldb_module *module,
- const struct ldb_message *msg)
+ const struct ldb_message *msg)
{
struct ldb_context *ldb = ldb_module_get_ctx(module);
unsigned int i, j;
@@ -283,15 +283,6 @@ static int ltdb_add_internal(struct ldb_module *module,
int ret = LDB_SUCCESS;
unsigned int i;
- ret = ltdb_check_special_dn(module, msg);
- if (ret != LDB_SUCCESS) {
- return ret;
- }
-
- if (ltdb_cache_load(module) != 0) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
for (i=0;i<msg->num_elements;i++) {
struct ldb_message_element *el = &msg->elements[i];
const struct ldb_schema_attribute *a = ldb_schema_attribute_by_name(ldb, el->name);
@@ -340,6 +331,11 @@ static int ltdb_add(struct ltdb_context *ctx)
struct ldb_request *req = ctx->req;
int ret = LDB_SUCCESS;
+ ret = ltdb_check_special_dn(module, req->op.add.message);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ldb_request_set_state(req, LDB_ASYNC_PENDING);
if (ltdb_cache_load(module) != 0) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list