summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-23 04:58:08 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-23 04:58:08 +0200
commit60164e9002c28911dbfd7115cb9bff05be5aff25 (patch)
tree38c815b9b6cfd2b2e00b3e8b7ddedf6ba9e47099 /source4
parent391ce30d497503ce998d0c5dbab9ea7d4fe3ed3b (diff)
parent596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954 (diff)
downloadsamba-60164e9002c28911dbfd7115cb9bff05be5aff25.tar.gz
samba-60164e9002c28911dbfd7115cb9bff05be5aff25.tar.bz2
samba-60164e9002c28911dbfd7115cb9bff05be5aff25.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c10
-rw-r--r--source4/torture/rpc/dssync.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 14fd107d81..190a66cdb3 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -466,6 +466,9 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
}
}
} else {
+ /* Flag that there was a DELETE
+ * without a value specified, so we
+ * need to look for the old value */
store_el = true;
}
@@ -475,6 +478,7 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
if (store_el) {
struct ldb_message_element *search_el;
+ /* Fill out ac->rc only if we have to find the old values */
if (!ac->rc) {
ac->rc = talloc_zero(ac, struct replace_context);
if (!ac->rc) {
@@ -499,6 +503,9 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
/* both replace and delete without values are handled in the callback
* after the search on the entry to be modified is performed */
+
+ /* Only bother doing a search of this entry (to find old
+ * values) if replace or delete operations are attempted */
if (ac->rc) {
const char **attrs;
@@ -527,9 +534,10 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
ret = ldb_next_request(module, search_req);
}
+
} else {
if (ac->ops) {
- /* start the mod requests chain */
+ /* Jump directly to handling the modifies */
ret = la_do_mod_request(ac);
} else {
/* nothing to do for this module, proceed */
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index bee2658816..847b32827b 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -825,7 +825,7 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
struct drsuapi_DsGetNT4ChangeLog r;
union drsuapi_DsGetNT4ChangeLogRequest req;
union drsuapi_DsGetNT4ChangeLogInfo info;
- int32_t level_out = 0;
+ uint32_t level_out = 0;
struct GUID null_guid;
struct dom_sid null_sid;
DATA_BLOB cookie;