1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd: Allow POSIX getinfo levels for smb3 unix extensions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 29 11:23:58 UTC 2022 on sn-devel-184
This commit is contained in:
Volker Lendecke 2022-11-22 16:00:53 +01:00
parent bbc82a5d42
commit 357bafe625

View File

@ -3563,10 +3563,21 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
size_t len = 0;
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
bool ok = false;
if (lp_smb1_unix_extensions() && req->posix_pathnames) {
DBG_DEBUG("SMB1 unix extensions activated\n");
ok = true;
}
if (!req->posix_pathnames) {
if (lp_smb3_unix_extensions() &&
(fsp != NULL) &&
(fsp->posix_flags & FSP_POSIX_FLAGS_OPEN)) {
DBG_DEBUG("SMB2 posix open\n");
ok = true;
}
if (!ok) {
return NT_STATUS_INVALID_LEVEL;
}
}