summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-01-08 09:29:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-08 13:03:06 +1100
commit595fad2b34b6f67b130344bc741ff0ddffb0db4f (patch)
treeb446ad26bdbce1280471dc1adedadff7cc7101cf /source4/dsdb/samdb/ldb_modules
parentf118f54ee783a97ed2bc5415213f3145710e0b4c (diff)
downloadsamba-595fad2b34b6f67b130344bc741ff0ddffb0db4f.tar.gz
samba-595fad2b34b6f67b130344bc741ff0ddffb0db4f.tar.bz2
samba-595fad2b34b6f67b130344bc741ff0ddffb0db4f.zip
s4-dsdb: allow specification of a SID if we are system
needed for samba3sam test
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 79bfc0a15c..edaf7251b8 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -901,7 +901,8 @@ static int samldb_fill_object(struct samldb_ctx *ac, const char *type)
/* don't allow objectSID to be specified without the RELAX control */
ac->sid = samdb_result_dom_sid(ac, ac->msg, "objectSid");
- if (ac->sid && !ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID)) {
+ if (ac->sid && !ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID) &&
+ !dsdb_module_am_system(ac->module)) {
ldb_asprintf_errstring(ldb, "No SID may be specified in user/group creation for %s",
ldb_dn_get_linearized(ac->msg->dn));
return LDB_ERR_UNWILLING_TO_PERFORM;