pdb: Use "sid_compose" where appropriate
authorVolker Lendecke <vl@samba.org>
Fri, 5 Oct 2018 10:12:39 +0000 (12:12 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 8 Oct 2018 20:17:11 +0000 (22:17 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/auth/token_util.c

index f5b0e69443356a8f5bc46358704336ac76f2d5bb..c95d54db671702f939071e432ec6414ab2f47e84 100644 (file)
@@ -220,8 +220,7 @@ static NTSTATUS add_builtin_guests(struct security_token *token,
        /*
         * First check the local GUEST account.
         */
-       sid_copy(&tmp_sid, get_global_sam_sid());
-       sid_append_rid(&tmp_sid, DOMAIN_RID_GUEST);
+       sid_compose(&tmp_sid, get_global_sam_sid(), DOMAIN_RID_GUEST);
 
        if (nt_token_check_sid(&tmp_sid, token)) {
                status = add_sid_to_array_unique(token,
@@ -237,8 +236,7 @@ static NTSTATUS add_builtin_guests(struct security_token *token,
        /*
         * First check the local GUESTS group.
         */
-       sid_copy(&tmp_sid, get_global_sam_sid());
-       sid_append_rid(&tmp_sid, DOMAIN_RID_GUESTS);
+       sid_compose(&tmp_sid, get_global_sam_sid(), DOMAIN_RID_GUESTS);
 
        if (nt_token_check_sid(&tmp_sid, token)) {
                status = add_sid_to_array_unique(token,