From 373bf313cd21d5ba6b5f2f8dca6ba76852d3709a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 25 May 2006 07:14:33 +0000 Subject: r15881: fixed the RAW-ACLS test for 64 bit systems (was failing on ppc64) (This used to be commit c954a6662de70fb36772e85b96aecf64761a66aa) --- source4/torture/raw/acls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/torture/raw/acls.c') diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 17f57d4ff5..e5e88386b0 100644 --- a/source4/torture/raw/acls.c +++ b/source4/torture/raw/acls.c @@ -1559,12 +1559,14 @@ static BOOL test_sd_get_set(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) uint64_t desired_64; uint32_t desired = 0, granted; int i = 0; +#define NO_BITS_HACK (((uint64_t)1)<<32) uint64_t open_bits = SEC_MASK_GENERIC | SEC_FLAG_SYSTEM_SECURITY | SEC_FLAG_MAXIMUM_ALLOWED | SEC_STD_ALL | - SEC_FILE_ALL; + SEC_FILE_ALL | + NO_BITS_HACK; uint64_t get_owner_bits = SEC_MASK_GENERIC | SEC_FLAG_MAXIMUM_ALLOWED | SEC_STD_READ_CONTROL; uint64_t set_owner_bits = SEC_GENERIC_ALL | SEC_FLAG_MAXIMUM_ALLOWED | SEC_STD_WRITE_OWNER; uint64_t get_group_bits = SEC_MASK_GENERIC | SEC_FLAG_MAXIMUM_ALLOWED | SEC_STD_READ_CONTROL; @@ -1610,10 +1612,10 @@ static BOOL test_sd_get_set(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) /* * now try each access_mask bit and no bit at all in a loop * and see what's allowed - * NOTE: if i == 32 it means access_mask = 0 + * NOTE: if i == 32 it means access_mask = 0 (see NO_BITS_HACK above) */ for (i=0; i <= 32; i++) { - desired_64 = 1 << i; + desired_64 = ((uint64_t)1) << i; desired = (uint32_t)desired_64; /* first open the file with the desired access */ -- cgit