From: Michael Adam Date: Sun, 19 Sep 2010 22:40:44 +0000 (+0200) Subject: s3:services_db: untangle assignments from check in construct_service_sd(). X-Git-Tag: release-alpha-4-0-0alpha14~3124 X-Git-Url: http://git.samba.org/?p=amitay%2Fsamba.git;a=commitdiff_plain;h=a67a553f40833a182b89a058d59015bcf19640f0 s3:services_db: untangle assignments from check in construct_service_sd(). --- diff --git a/source3/services/services_db.c b/source3/services/services_db.c index 0afc6c16b4c..f3c550a91fc 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -114,13 +114,17 @@ static struct security_descriptor* construct_service_sd( TALLOC_CTX *ctx ) /* create the security descriptor */ - if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) ) + theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace); + if (theacl == NULL) { return NULL; + } - if ( !(sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1, - SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL, - theacl, &sd_size)) ) + sd = make_sec_desc(ctx, SECURITY_DESCRIPTOR_REVISION_1, + SEC_DESC_SELF_RELATIVE, NULL, NULL, NULL, + theacl, &sd_size); + if (sd == NULL) { return NULL; + } return sd; }