[SCM] Samba Shared Repository - branch master updated
Nadezhda Ivanova
nivanova at samba.org
Fri Jan 28 04:05:02 MST 2011
The branch, master has been updated
via 95e644f s4-acl: Fixed returning uninitialized ldap error in case of some critical errors.
from 1232fb5 s3-rpc_client: remove some more obsolete cli_X.h header files.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 95e644f4605f91632bf606d5ec36abc187bc98af
Author: Nadezhda Ivanova <nivanova at samba.org>
Date: Fri Jan 28 11:58:14 2011 +0200
s4-acl: Fixed returning uninitialized ldap error in case of some critical errors.
Autobuild-User: Nadezhda Ivanova <nivanova at samba.org>
Autobuild-Date: Fri Jan 28 12:04:01 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/acl.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 2db4de5..69ff2aa 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -891,8 +891,9 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
ret = dsdb_get_sd_from_ldb_message(ldb, tmp_ctx, acl_res->msgs[0], &sd);
if (ret != LDB_SUCCESS) {
- DEBUG(10, ("acl_modify: cannot get descriptor\n"));
- goto fail;
+ talloc_free(tmp_ctx);
+ return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
+ "acl_modify: Error retrieving security descriptor.");
}
/* Theoretically we pass the check if the object has no sd */
if (!sd) {
@@ -901,19 +902,21 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
guid = get_oc_guid_from_message(module, schema, acl_res->msgs[0]);
if (!guid) {
- DEBUG(10, ("acl_modify: cannot get guid\n"));
- goto fail;
+ talloc_free(tmp_ctx);
+ return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
+ "acl_modify: Error retrieving object class GUID.");
}
sid = samdb_result_dom_sid(req, acl_res->msgs[0], "objectSid");
if (!insert_in_object_tree(tmp_ctx, guid, SEC_ADS_WRITE_PROP,
&root, &new_node)) {
- DEBUG(10, ("acl_modify: cannot add to object tree\n"));
- goto fail;
+ talloc_free(tmp_ctx);
+ return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
+ "acl_modify: Error adding new node in object tree.");
}
for (i=0; i < req->op.mod.message->num_elements; i++){
const struct dsdb_attribute *attr;
attr = dsdb_attribute_by_lDAPDisplayName(schema,
- req->op.mod.message->elements[i].name);
+ req->op.mod.message->elements[i].name);
if (ldb_attr_cmp("nTSecurityDescriptor", req->op.mod.message->elements[i].name) == 0) {
status = sec_access_check_ds(sd, acl_user_token(module),
--
Samba Shared Repository
More information about the samba-cvs
mailing list