summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-08-08 06:37:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:35 -0500
commit9fd3416452ac82d27dac7b8c16f6ad89f5551f6b (patch)
treeb061e8b53317f99f85159bef697fbc0de500ef5a /source4/dsdb
parentb5c4c5f4209c10f1d6198017f503f09721ebd341 (diff)
downloadsamba-9fd3416452ac82d27dac7b8c16f6ad89f5551f6b.tar.gz
samba-9fd3416452ac82d27dac7b8c16f6ad89f5551f6b.tar.bz2
samba-9fd3416452ac82d27dac7b8c16f6ad89f5551f6b.zip
r24277: Tidyup as requested by metze.
Andrew Bartlett (This used to be commit 43d62181f204fb32e487b7689729c1a91b8d23ad)
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index a9ef93cab1..0d55ef07db 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -201,16 +201,18 @@ static int objectclass_sort(struct ldb_module *module,
return LDB_SUCCESS;
}
-DATA_BLOB *get_sd(struct ldb_module *module, TALLOC_CTX *mem_ctx,
- const struct dsdb_class *objectclass)
+static DATA_BLOB *get_sd(struct ldb_module *module, TALLOC_CTX *mem_ctx,
+ const struct dsdb_class *objectclass)
{
NTSTATUS status;
DATA_BLOB *linear_sd;
struct auth_session_info *session_info
= ldb_get_opaque(module->ldb, "sessionInfo");
- struct security_descriptor *sd = sddl_decode(mem_ctx,
- objectclass->defaultSecurityDescriptor,
- samdb_domain_sid(module->ldb));
+ struct security_descriptor *sd
+ = sddl_decode(mem_ctx,
+ objectclass->defaultSecurityDescriptor,
+ samdb_domain_sid(module->ldb));
+
if (!session_info || !session_info->security_token) {
return NULL;
}
@@ -300,17 +302,21 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
for (current = sorted; current; current = current->next) {
ret = ldb_msg_add_string(msg, "objectClass", current->objectclass);
if (ret != LDB_SUCCESS) {
- ldb_set_errstring(module->ldb, "objectclass: could not re-add sorted objectclass to modify msg");
+ ldb_set_errstring(module->ldb,
+ "objectclass: could not re-add sorted "
+ "objectclass to modify msg");
talloc_free(mem_ctx);
return ret;
}
/* Last one is the critical one */
if (schema && !current->next) {
const struct dsdb_class *objectclass
- = dsdb_class_by_lDAPDisplayName(schema, current->objectclass);
+ = dsdb_class_by_lDAPDisplayName(schema,
+ current->objectclass);
if (objectclass) {
if (!ldb_msg_find_element(msg, "objectCategory")) {
- ldb_msg_add_string(msg, "objectCategory", objectclass->defaultObjectCategory);
+ ldb_msg_add_string(msg, "objectCategory",
+ objectclass->defaultObjectCategory);
}
if (!ldb_msg_find_element(msg, "ntSecurityDescriptor")) {
DATA_BLOB *sd = get_sd(module, mem_ctx, objectclass);