mirror of
https://github.com/samba-team/samba.git
synced 2025-07-23 20:59:10 +03:00
Revert "s4/dsdb: Set schemaInfo attribute value during provisioning"
This reverts commit 8149094edd
.
Windows implementation does not set schemaInfo attribute value
until first Schema update request.
This way, newly provisioned forest returns no schemaInfo value.
I think it won't be bad for us to have this value preset, but
I want to mimic Win AD behavior as close as possible.
This commit is contained in:
@ -159,30 +159,6 @@ static PyObject *py_dsdb_write_prefixes_from_schema_to_ldb(PyObject *self, PyObj
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *py_dsdb_schema_info_reset(PyObject *self, PyObject *args)
|
||||
{
|
||||
PyObject *py_ldb;
|
||||
struct ldb_context *ldb;
|
||||
WERROR result;
|
||||
struct dsdb_schema *schema;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O", &py_ldb))
|
||||
return NULL;
|
||||
|
||||
PyErr_LDB_OR_RAISE(py_ldb, ldb);
|
||||
|
||||
schema = dsdb_get_schema(ldb, NULL);
|
||||
if (!schema) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to set find a schema on ldb!\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
result = dsdb_schema_info_reset(ldb, schema);
|
||||
PyErr_WERROR_IS_ERR_RAISE(result);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *py_dsdb_set_schema_from_ldb(PyObject *self, PyObject *args)
|
||||
{
|
||||
PyObject *py_ldb;
|
||||
@ -277,8 +253,6 @@ static PyMethodDef py_misc_methods[] = {
|
||||
NULL },
|
||||
{ "dsdb_write_prefixes_from_schema_to_ldb", (PyCFunction)py_dsdb_write_prefixes_from_schema_to_ldb, METH_VARARGS,
|
||||
NULL },
|
||||
{ "dsdb_schema_info_reset", (PyCFunction)py_dsdb_schema_info_reset, METH_VARARGS,
|
||||
"Reset schemaInfo value to default for a new Forest" },
|
||||
{ "dsdb_set_schema_from_ldb", (PyCFunction)py_dsdb_set_schema_from_ldb, METH_VARARGS,
|
||||
NULL },
|
||||
{ "set_debug_level", (PyCFunction)py_set_debug_level, METH_VARARGS,
|
||||
|
@ -286,9 +286,6 @@ class Ldb(_Ldb):
|
||||
def write_prefixes_from_schema(self):
|
||||
_glue.dsdb_write_prefixes_from_schema_to_ldb(self)
|
||||
|
||||
def set_schema_info(self):
|
||||
_glue.dsdb_schema_info_reset(self)
|
||||
|
||||
def convert_schema_to_openldap(self, target, mapping):
|
||||
return dsdb.dsdb_convert_schema_to_openldap(self, target, mapping)
|
||||
|
||||
|
@ -946,8 +946,6 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp,
|
||||
message("Setting up sam.ldb schema")
|
||||
samdb.add_ldif(schema.schema_dn_add, controls=["relax:0"])
|
||||
samdb.modify_ldif(schema.schema_dn_modify)
|
||||
# set schemaInfo to defalt value for a new Forest
|
||||
samdb.set_schema_info()
|
||||
samdb.write_prefixes_from_schema()
|
||||
samdb.add_ldif(schema.schema_data, controls=["relax:0"])
|
||||
setup_add_ldif(samdb, setup_path("aggregate_schema.ldif"),
|
||||
|
Reference in New Issue
Block a user