git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dad9131
)
Fix for schemaUpdateNow command
author
Anatoliy Atanasov
<anatoliy.atanasov@postpath.com>
Fri, 3 Jul 2009 12:24:40 +0000
(15:24 +0300)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 8 Jul 2009 04:40:20 +0000
(14:40 +1000)
source4/dsdb/samdb/ldb_modules/partition.c
patch
|
blob
|
history
source4/dsdb/samdb/ldb_modules/rootdse.c
patch
|
blob
|
history
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
patch
|
blob
|
history
source4/dsdb/schema/schema_init.c
patch
|
blob
|
history
source4/dsdb/schema/schema_set.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/samdb/ldb_modules/partition.c
b/source4/dsdb/samdb/ldb_modules/partition.c
index 9763664940b79d2c5705a999073ebe284f0e3055..563abf672afab31b7952bf8d9cd1630595b57e45 100644
(file)
--- a/
source4/dsdb/samdb/ldb_modules/partition.c
+++ b/
source4/dsdb/samdb/ldb_modules/partition.c
@@
-1060,7
+1060,13
@@
static int partition_extended_schema_update_now(struct ldb_module *module, struc
}
/* fire the first one */
}
/* fire the first one */
- return partition_call_first(ac);
+ ret = partition_call_first(ac);
+
+ if (ret != LDB_SUCCESS){
+ return ret;
+ }
+
+ return ldb_request_done(req, ret);
}
}
diff --git
a/source4/dsdb/samdb/ldb_modules/rootdse.c
b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 29c4f5958fb9899ae456690e82e1fd4446a7ebd4..7080fb632f12172fb7528fb17ee6186acdfb15b4 100644
(file)
--- a/
source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/
source4/dsdb/samdb/ldb_modules/rootdse.c
@@
-455,7
+455,7
@@
static int rootdse_modify(struct ldb_module *module, struct ldb_request *req)
}
talloc_free(ext_res);
}
talloc_free(ext_res);
- return
ret
;
+ return
ldb_request_done(req, ret)
;
}
_PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
}
_PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
diff --git
a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index b1d8711cfa14dbd0a0507c61ee90d02fe05462a1..1b8f786c3542eb8378da899f5e47e6fe65f3f3c8 100644
(file)
--- a/
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@
-297,6
+297,8
@@
static int schema_fsmo_extended(struct ldb_module *module, struct ldb_request *r
return ret;
}
return ret;
}
+ dsdb_make_schema_global(ldb);
+
talloc_free(mem_ctx);
return LDB_SUCCESS;
}
talloc_free(mem_ctx);
return LDB_SUCCESS;
}
diff --git
a/source4/dsdb/schema/schema_init.c
b/source4/dsdb/schema/schema_init.c
index 1084679f8ddf92d6c4db153cb48547ccaf30382e..dfa745e305c62dce23616b0e58112124d8ddbaec 100644
(file)
--- a/
source4/dsdb/schema/schema_init.c
+++ b/
source4/dsdb/schema/schema_init.c
@@
-576,7
+576,7
@@
WERROR dsdb_read_prefixes_from_ldb(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
(*prefixes)[i].id = blob->ctr.dsdb.mappings[i].id_prefix<<16;
oid = talloc_strdup(mem_ctx, blob->ctr.dsdb.mappings[i].oid.oid);
(*prefixes)[i].oid = talloc_asprintf_append(oid, ".");
(*prefixes)[i].id = blob->ctr.dsdb.mappings[i].id_prefix<<16;
oid = talloc_strdup(mem_ctx, blob->ctr.dsdb.mappings[i].oid.oid);
(*prefixes)[i].oid = talloc_asprintf_append(oid, ".");
- (*prefixes)[i].oid_len = strlen(
blob->ctr.dsdb.mappings[i].oid
.oid);
+ (*prefixes)[i].oid_len = strlen(
(*prefixes)[i]
.oid);
}
talloc_free(blob);
}
talloc_free(blob);
diff --git
a/source4/dsdb/schema/schema_set.c
b/source4/dsdb/schema/schema_set.c
index 8b1188a1b5bf57b382b5c2750770eb8c30fd1134..5ded04e9da1ef53243c7fe63addcb12601d723f9 100644
(file)
--- a/
source4/dsdb/schema/schema_set.c
+++ b/
source4/dsdb/schema/schema_set.c
@@
-135,7
+135,7
@@
static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
mod_msg = ldb_msg_diff(ldb, res->msgs[0], msg);
if (mod_msg->num_elements > 0) {
mod_msg = ldb_msg_diff(ldb, res->msgs[0], msg);
if (mod_msg->num_elements > 0) {
- ret =
ldb_modify(ldb
, mod_msg);
+ ret =
samdb_replace(ldb, mem_ctx
, mod_msg);
}
}
}
}
@@
-154,7
+154,7
@@
static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
ret = ldb_add(ldb, msg_idx);
} else if (ret != LDB_SUCCESS) {
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
ret = ldb_add(ldb, msg_idx);
} else if (ret != LDB_SUCCESS) {
- } else if (res->count != 1) {
+ } else if (res
_idx
->count != 1) {
ret = ldb_add(ldb, msg_idx);
} else {
ret = LDB_SUCCESS;
ret = ldb_add(ldb, msg_idx);
} else {
ret = LDB_SUCCESS;
@@
-163,7
+163,7
@@
static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
mod_msg = ldb_msg_diff(ldb, res_idx->msgs[0], msg_idx);
if (mod_msg->num_elements > 0) {
mod_msg = ldb_msg_diff(ldb, res_idx->msgs[0], msg_idx);
if (mod_msg->num_elements > 0) {
- ret =
ldb_modify(ldb
, mod_msg);
+ ret =
samdb_replace(ldb, mem_ctx
, mod_msg);
}
}
if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
}
}
if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {