From: Jeremy Allison Date: Wed, 3 Jun 2020 20:44:55 +0000 (-0700) Subject: s3: Fix dfs-reparse testing code to use 32-bit attributes. Change variable names... X-Git-Tag: ldb-2.2.0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30b3475f4aeed3da8795690ed2fd1d67a59f1de7;p=thirdparty%2Fsamba.git s3: Fix dfs-reparse testing code to use 32-bit attributes. Change variable names mode -> attr. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 094fdcb2434..a4ffc25de4c 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -11453,10 +11453,10 @@ static NTSTATUS msdfs_attribute_list_fn(const char *mnt, const char *mask, void *private_data) { - uint16_t *p_mode = (uint16_t *)private_data; + uint32_t *p_attr = (uint32_t *)private_data; if (strequal(finfo->name, test_filename)) { - *p_mode = finfo->attr; + *p_attr = finfo->attr; } return NT_STATUS_OK; @@ -11466,7 +11466,7 @@ static bool run_msdfs_attribute(int dummy) { static struct cli_state *cli; bool correct = false; - uint16_t mode = 0; + uint32_t attr = 0; NTSTATUS status; printf("Starting MSDFS-ATTRIBUTE test\n"); @@ -11492,26 +11492,26 @@ static bool run_msdfs_attribute(int dummy) "*", FILE_ATTRIBUTE_DIRECTORY, msdfs_attribute_list_fn, - &mode); + &attr); if (!NT_STATUS_IS_OK(status)) { printf("cli_list failed with %s\n", nt_errstr(status)); goto out; } - if ((mode & FILE_ATTRIBUTE_REPARSE_POINT) == 0) { + if ((attr & FILE_ATTRIBUTE_REPARSE_POINT) == 0) { printf("file %s should have " "FILE_ATTRIBUTE_REPARSE_POINT set. attr = 0x%x\n", test_filename, - (unsigned int)mode); + (unsigned int)attr); goto out; } - if ((mode & FILE_ATTRIBUTE_DIRECTORY) == 0) { + if ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { printf("file %s should have " "FILE_ATTRIBUTE_DIRECTORY set. attr = 0x%x\n", test_filename, - (unsigned int)mode); + (unsigned int)attr); goto out; }