1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:torture: Use SID constants

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-09-11 15:28:44 +12:00 committed by Andrew Bartlett
parent 8b496331b9
commit dc73160381
2 changed files with 5 additions and 5 deletions

View File

@ -142,7 +142,7 @@ static bool test_sd(struct torture_context *tctx, struct smbcli_state *cli)
union smb_setfileinfo set;
struct security_ace ace = {};
struct security_descriptor *sd;
struct dom_sid *test_sid;
const struct dom_sid *test_sid;
if (!torture_setup_dir(cli, BASEDIR))
return false;
@ -179,7 +179,7 @@ static bool test_sd(struct torture_context *tctx, struct smbcli_state *cli)
torture_comment(tctx, "add a new ACE to the DACL\n");
test_sid = dom_sid_parse_talloc(tctx, SID_NT_AUTHENTICATED_USERS);
test_sid = &global_sid_Authenticated_Users;
ace.type = SEC_ACE_TYPE_ACCESS_ALLOWED;
ace.flags = 0;
@ -231,7 +231,7 @@ static bool test_nttrans_create_ext(struct torture_context *tctx,
union smb_fileinfo q = {};
struct security_ace ace;
struct security_descriptor *sd;
struct dom_sid *test_sid;
const struct dom_sid *test_sid;
uint32_t attrib =
FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_SYSTEM |
@ -287,7 +287,7 @@ static bool test_nttrans_create_ext(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
torture_comment(tctx, "adding a new ACE\n");
test_sid = dom_sid_parse_talloc(tctx, SID_NT_AUTHENTICATED_USERS);
test_sid = &global_sid_Authenticated_Users;
ace.type = SEC_ACE_TYPE_ACCESS_ALLOWED;
ace.flags = 0;

View File

@ -2006,7 +2006,7 @@ static bool test_stream_permissions(struct torture_context *tctx,
ace.type = SEC_ACE_TYPE_ACCESS_DENIED;
ace.flags = 0;
ace.access_mask = SEC_FILE_WRITE_DATA;
ace.trustee = *dom_sid_parse_talloc(tctx, SID_WORLD);
ace.trustee = global_sid_World;
status = security_descriptor_dacl_add(sd, &ace);
CHECK_STATUS(status, NT_STATUS_OK);