1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s4:dsdb/schema_data: reject schema update unless they're allowed

"dsdb:schema update allowed = yes" is now needed in smb.conf
to enable schema updates, as schema updates are a currenty a good
way to prevent samba from startup again, because of errors in
the schema definition.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov 15 13:00:07 CET 2011 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2011-11-11 16:55:37 +01:00
parent 0be0da9650
commit c1fd56fdd4

View File

@ -179,6 +179,12 @@ static int schema_data_add(struct ldb_module *module, struct ldb_request *req)
return LDB_ERR_UNWILLING_TO_PERFORM;
}
if (!schema->fsmo.update_allowed && !rodc) {
ldb_debug_set(ldb, LDB_DEBUG_ERROR,
"schema_data_add: updates are not allowed: reject request\n");
return LDB_ERR_UNWILLING_TO_PERFORM;
}
if (ldb_request_get_control(req, LDB_CONTROL_RELAX_OID)) {
/*
* the provision code needs to create
@ -317,6 +323,12 @@ static int schema_data_modify(struct ldb_module *module, struct ldb_request *req
return LDB_ERR_UNWILLING_TO_PERFORM;
}
if (!schema->fsmo.update_allowed && !rodc) {
ldb_debug_set(ldb, LDB_DEBUG_ERROR,
"schema_data_add: updates are not allowed: reject request\n");
return LDB_ERR_UNWILLING_TO_PERFORM;
}
return ldb_next_request(module, req);
}