smbd: implement access checks for SMB2-GETINFO as per MS-SMB2 3.3.5.20.1
authorRalph Boehme <slow@samba.org>
Sun, 14 Aug 2022 16:46:24 +0000 (18:46 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 23 Aug 2022 12:54:08 +0000 (12:54 +0000)
commit6d493a9d568c08cfe5242821ccbd5a5ee1fe5284
treed69f429fbc86024fa221a05886ec702216812e7e
parent9b2d28157107602fcbe659664cf9ca25f08bb30b
smbd: implement access checks for SMB2-GETINFO as per MS-SMB2 3.3.5.20.1

The spec lists the following as requiring special access:

- for requiring FILE_READ_ATTRIBUTES:

  FileBasicInformation
  FileAllInformation
  FileNetworkOpenInformation
  FileAttributeTagInformation

- for requiring FILE_READ_EA:

  FileFullEaInformation

All other infolevels are unrestricted.

We ignore the IPC related infolevels:

  FilePipeInformation
  FilePipeLocalInformation
  FilePipeRemoteInformation

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153
RN: Missing SMB2-GETINFO access checks from MS-SMB2 3.3.5.20.1

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug 23 12:54:08 UTC 2022 on sn-devel-184
selftest/knownfail
selftest/knownfail.d/samba3.smb2.getinfo [deleted file]
source3/smbd/smb2_getinfo.c