examples: clifuse: Info level SMB_FIND_FILE_BOTH_DIRECTORY_INFO encodes attibutes...
authorJeremy Allison <jra@samba.org>
Wed, 3 Jun 2020 17:29:24 +0000 (10:29 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 17:11:36 +0000 (17:11 +0000)
Cast to a uint16_t for now after pulling the information
as finfo->mode is currently only 16 bits.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
examples/fuse/clifuse.c

index 954c412f09cddb0166b112b3590f8bd4e33f4ac5..5b180fdf3d3f0a52374f78c7d5399a4fd3f5bef9 100644 (file)
@@ -496,7 +496,7 @@ static NTSTATUS parse_finfo_id_both_directory_info(uint8_t *dir_data,
        finfo->mtime_ts = interpret_long_date((const char *)dir_data + 24);
        finfo->ctime_ts = interpret_long_date((const char *)dir_data + 32);
        finfo->size = IVAL2_TO_SMB_BIG_UINT(dir_data + 40, 0);
-       finfo->mode = CVAL(dir_data + 56, 0);
+       finfo->mode = (uint16_t)IVAL(dir_data + 56, 0);
        namelen = IVAL(dir_data + 60,0);
        if (namelen > (dir_data_length - 104)) {
                return NT_STATUS_INFO_LENGTH_MISMATCH;