summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-28 09:29:09 +1000
committerAndrew Tridgell <tridge@samba.org>2011-10-04 15:08:56 +1100
commitf52d8ca0238ee5fef643bbc0b3c249b0397a61b5 (patch)
treec3adae5aa356c100de777523a91fdb8112672efb /source4
parentfaf8581e38764ec932f3809479c4631131b8fd1b (diff)
downloadsamba-f52d8ca0238ee5fef643bbc0b3c249b0397a61b5.tar.gz
samba-f52d8ca0238ee5fef643bbc0b3c249b0397a61b5.tar.bz2
samba-f52d8ca0238ee5fef643bbc0b3c249b0397a61b5.zip
s4-dsdb: allow uninstantiated NC heads
this allows INSTANCE_TYPE_WRITE to be not set if INSTANCE_TYPE_UNINSTANT is set
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/instancetype.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/instancetype.c b/source4/dsdb/samdb/ldb_modules/instancetype.c
index e008deb02b..d743d4fb30 100644
--- a/source4/dsdb/samdb/ldb_modules/instancetype.c
+++ b/source4/dsdb/samdb/ldb_modules/instancetype.c
@@ -77,9 +77,11 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
} else {
/*
* If we have a NC add operation then we need also the
- * "TYPE_WRITE" flag in order to succeed.
+ * "TYPE_WRITE" flag in order to succeed,
+ * unless this NC is not instantiated
*/
- if (!(instanceType & INSTANCE_TYPE_WRITE)) {
+ if (!(instanceType & INSTANCE_TYPE_UNINSTANT) &&
+ !(instanceType & INSTANCE_TYPE_WRITE)) {
ldb_set_errstring(ldb, "instancetype: if TYPE_IS_NC_HEAD was set, then also TYPE_WRITE is requested!");
return LDB_ERR_UNWILLING_TO_PERFORM;
}