s3-util_nttoken.c Also copy the rights_mask when copying a security_token
authorAndrew Bartlett <abartlet@samba.org>
Fri, 17 Sep 2010 06:23:53 +0000 (16:23 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 14 Oct 2010 02:35:04 +0000 (02:35 +0000)
These are unused in source3/ code at the moment, but it would be
unfortunate if that were to change, and this function not be updated.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source3/lib/util_nttoken.c

index 81def87931885c1e77f4bc092ed9c8ef14e227d6..2fd0f088ab714a5ff8311ed50b0372da36abade1 100644 (file)
@@ -58,6 +58,7 @@ struct security_token *dup_nt_token(TALLOC_CTX *mem_ctx, const struct security_t
        }
        
        token->privilege_mask = ptoken->privilege_mask;
+       token->rights_mask = ptoken->rights_mask;
 
        return token;
 }
@@ -107,6 +108,9 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
        token->privilege_mask |= token_1->privilege_mask;
        token->privilege_mask |= token_2->privilege_mask;
 
+       token->rights_mask |= token_1->rights_mask;
+       token->rights_mask |= token_2->rights_mask;
+
        *token_out = token;
 
        return NT_STATUS_OK;