1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4-dsdb: allow specification of a SID if we are system

needed for samba3sam test
This commit is contained in:
Andrew Tridgell 2010-01-08 09:29:32 +11:00
parent f118f54ee7
commit 595fad2b34

View File

@ -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 */ /* don't allow objectSID to be specified without the RELAX control */
ac->sid = samdb_result_dom_sid(ac, ac->msg, "objectSid"); 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_asprintf_errstring(ldb, "No SID may be specified in user/group creation for %s",
ldb_dn_get_linearized(ac->msg->dn)); ldb_dn_get_linearized(ac->msg->dn));
return LDB_ERR_UNWILLING_TO_PERFORM; return LDB_ERR_UNWILLING_TO_PERFORM;