summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-18 14:44:51 +0100
committerMichael Adam <obnox@samba.org>2008-02-18 17:41:20 +0100
commite16f039f26c88b8c602dc0d5e8a836688f7464d2 (patch)
treeae5fb11c88e63a76e2dfea950e640c53ad3dce98 /source3
parentd38e756feb33718ff252d65fccdf8e4c7fe8ab4a (diff)
downloadsamba-e16f039f26c88b8c602dc0d5e8a836688f7464d2.tar.gz
samba-e16f039f26c88b8c602dc0d5e8a836688f7464d2.tar.bz2
samba-e16f039f26c88b8c602dc0d5e8a836688f7464d2.zip
Reformat construct_registry_sd() slightly (stick to coding rules).
Michael (This used to be commit d87fb13959f84dfbbd3e1cc875f78d6e8ad44130)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_dispatcher.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/source3/registry/reg_dispatcher.c b/source3/registry/reg_dispatcher.c
index 93b36f9289..f3fe5de98c 100644
--- a/source3/registry/reg_dispatcher.c
+++ b/source3/registry/reg_dispatcher.c
@@ -34,7 +34,7 @@ static const struct generic_mapping reg_generic_map =
/********************************************************************
********************************************************************/
-static SEC_DESC* construct_registry_sd( TALLOC_CTX *ctx )
+static SEC_DESC* construct_registry_sd(TALLOC_CTX *ctx)
{
SEC_ACE ace[3];
SEC_ACCESS mask;
@@ -45,26 +45,35 @@ static SEC_DESC* construct_registry_sd( TALLOC_CTX *ctx )
/* basic access for Everyone */
- init_sec_access(&mask, REG_KEY_READ );
- init_sec_ace(&ace[i++], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
+ init_sec_access(&mask, REG_KEY_READ);
+ init_sec_ace(&ace[i++], &global_sid_World, SEC_ACE_TYPE_ACCESS_ALLOWED,
+ mask, 0);
/* Full Access 'BUILTIN\Administrators' */
- init_sec_access(&mask, REG_KEY_ALL );
- init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
+ init_sec_access(&mask, REG_KEY_ALL);
+ init_sec_ace(&ace[i++], &global_sid_Builtin_Administrators,
+ SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
/* Full Access 'NT Authority\System' */
init_sec_access(&mask, REG_KEY_ALL );
- init_sec_ace(&ace[i++], &global_sid_System, SEC_ACE_TYPE_ACCESS_ALLOWED, mask, 0);
+ init_sec_ace(&ace[i++], &global_sid_System, SEC_ACE_TYPE_ACCESS_ALLOWED,
+ mask, 0);
/* create the security descriptor */
- if ( !(acl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) )
+ acl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace);
+ if (acl == NULL) {
return NULL;
+ }
- if ( !(sd = make_sec_desc(ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE, &global_sid_Builtin_Administrators, NULL, NULL, acl, &sd_size)) )
+ sd = make_sec_desc(ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
+ &global_sid_Builtin_Administrators, NULL, NULL, acl,
+ &sd_size);
+ if (sd == NULL) {
return NULL;
+ }
return sd;
}