1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00
Noel Power c57dcafb15 s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 (windows only)
uint16_t get_fileinfo(...) returns file attributes, this function
called

     cli_qfileinfo_basic(cli, fnum, &mode, NULL, NULL, NULL,
                     NULL, NULL, NULL);

which was failing with NT_STATUS_ACCESS_DENIED errors when fnum above
was obtained via (when using protocol > SMB). Note: This only seems to be
an issue when run against a windows server, with smbd SMB1 & SMB2 work fine.

    status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
                  0, FILE_SHARE_READ|FILE_SHARE_WRITE,
                  FILE_OPEN, 0x0, 0x0, &fnum, NULL);

The failing cli_qfileinfo_basic call above is unnecessary as we can already
obtain the required information from the cli_ntcreate call

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2017-07-20 18:49:27 +02:00
..
2017-02-22 08:26:22 +01:00
2016-11-23 13:00:21 +01:00
2017-01-22 18:30:11 +01:00
2017-01-22 18:30:11 +01:00
2017-01-22 18:30:11 +01:00
2015-01-19 06:48:05 +01:00
2017-01-22 18:30:11 +01:00
2017-01-22 18:30:11 +01:00