summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-22 09:48:17 +1000
committerAndrew Tridgell <tridge@samba.org>2011-09-22 10:00:48 +1000
commit00ef18f19c39bf5083939ac79854bcd1ccc7cef7 (patch)
treea0bfaba0f37026451b03b75bff0f7cfbe179cc65 /source4/dsdb/common
parent73f2df6a378034455f44bb5ed94a7eba97e04448 (diff)
downloadsamba-00ef18f19c39bf5083939ac79854bcd1ccc7cef7.tar.gz
samba-00ef18f19c39bf5083939ac79854bcd1ccc7cef7.tar.bz2
samba-00ef18f19c39bf5083939ac79854bcd1ccc7cef7.zip
s4-dsdb: added NO_GLOBAL_CATALOG control
this control is used to ask samdb to not return searches with a basedn in partial repica partitions, which is needed to support the difference between a search on the 3268 GC ldap port and the non-GC 389 port
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c11
-rw-r--r--source4/dsdb/common/util.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index f5443ea59d..cf28f1dd01 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2752,7 +2752,7 @@ WERROR dsdb_savereps(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, struct ld
el->values[i] = v;
}
- if (ldb_modify(sam_ctx, msg) != LDB_SUCCESS) {
+ if (dsdb_modify(sam_ctx, msg, 0) != LDB_SUCCESS) {
DEBUG(0,("Failed to store %s - %s\n", attr, ldb_errstring(sam_ctx)));
goto failed;
}
@@ -3658,6 +3658,15 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
}
}
+ if (dsdb_flags & DSDB_SEARCH_NO_GLOBAL_CATALOG) {
+ ret = ldb_request_add_control(req,
+ DSDB_CONTROL_NO_GLOBAL_CATALOG,
+ false, NULL);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ }
+
if (dsdb_flags & DSDB_SEARCH_SHOW_DELETED) {
ret = ldb_request_add_control(req, LDB_CONTROL_SHOW_DELETED_OID, true, NULL);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index 0140f2956e..75ef49e1c3 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -36,6 +36,7 @@
#define DSDB_SEARCH_SHOW_RECYCLED 0x0400
#define DSDB_PROVISION 0x0800
#define DSDB_BYPASS_PASSWORD_HASH 0x1000
+#define DSDB_SEARCH_NO_GLOBAL_CATALOG 0x2000
bool is_attr_in_list(const char * const * attrs, const char *attr);