1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

130890 Commits

Author SHA1 Message Date
Jule Anger
c61c79fd8c WHATSNEW: Add release notes for Samba 4.17.0.
Signed-off-by: Jule Anger <janger@samba.org>
2022-09-13 17:53:11 +02:00
Jule Anger
ef5b28a258 VERSION: Bump version up to Samba 4.17.0rc6...
and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2022-09-06 16:20:55 +02:00
Jule Anger
28b356ae82 VERSION: Disable GIT_SNAPSHOT for the 4.17.0rc5 release.
Signed-off-by: Jule Anger <janger@samba.org>
samba-4.17.0rc5
2022-09-06 16:20:16 +02:00
Jule Anger
f83fb43ff9 WHATSNEW: Add release notes for Samba 4.17.0rc5.
Signed-off-by: Jule Anger <janger@samba.org>
2022-09-06 16:19:46 +02:00
Stefan Metzmacher
71c94a076b smbXsrv_client: notify a different node to drop a connection by client guid.
If a client disconnected all its interfaces and reconnects when
the come back, it will likely start from any ip address returned
dns, which means it can try to connect to a different ctdb node.
The old node may not have noticed the disconnect and still holds
the client_guid based smbd.

Up unil now the new node returned NT_STATUS_NOT_SUPPORTED to
the SMB2 Negotiate request, as messaging_send_iov[_from]() will
return -1/ENOSYS if a file descriptor os passed to a process on
a different node.

Now we tell the other node to teardown all client connections
belonging to the client-guid.

Note that this is not authenticated, but if an attacker can
capture the client-guid, he can also inject TCP resets anyway,
to get the same effect.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15159

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 20:59:15 UTC 2022 on sn-devel-184

(cherry picked from commit 8591d9424371e173b079d5c8a267ea4c2cb266ad)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Tue Sep  6 10:27:58 UTC 2022 on sn-devel-184
2022-09-06 10:27:58 +00:00
Stefan Metzmacher
095ee4ce18 smbXsrv_client: correctly check in negotiate_request.length smbXsrv_client_connection_pass[ed]_*
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15159

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 21ef01e7b8368caa050ed82b9d787d1679220b2b)
2022-09-06 09:24:13 +00:00
Stefan Metzmacher
64daf27dc7 s3:tests: add test_smbXsrv_client_cross_node.sh
This demonstrates that a client-guid connected to ctdb node 0
caused a connection with the same client-guid to be rejected by
ctdb node 1. Node 1 rejects the SMB2 Negotiate with
NT_STATUS_NOT_SUPPORTED, because passing the multi-channel connection
to a different node is not supported.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15159

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 0efcfaa49c3d61f2c8116ebafd55b72d3277d0d8)
2022-09-06 09:24:13 +00:00
Stefan Metzmacher
fc52fe99d7 s3:tests: let test_smbXsrv_client_dead_rec.sh cleanup the correct files
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15159

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 3fd18a0d5b77a9f78c595852c342d4c8c33fac61)
2022-09-06 09:24:13 +00:00
Volker Lendecke
ed1d011261 smbd: Catch streams on non-stream shares
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15161

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Sep  2 15:56:56 UTC 2022 on sn-devel-184

(cherry picked from commit 3a37e4155c3cd82388652f89b611f2c46fee8525)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Tue Sep  6 08:08:12 UTC 2022 on sn-devel-184
2022-09-06 08:08:12 +00:00
Ralph Boehme
930380d474 smbd: return NT_STATUS_OBJECT_NAME_INVALID if a share doesn't support streams
This is what a Windows server returns. Tested with a share residing on a FAT
formatted drive, a Windows filesystem that doesn't support streams.

Combinations tested:

  file::$DATA
  file:stream
  file:stream:$DATA

All three fail with NT_STATUS_OBJECT_NAME_INVALID.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15161

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 201e1969bf31af07e8bd52876ff7f4d72b48a848)
2022-09-06 07:05:50 +00:00
Ralph Boehme
3139a1063a smbtorture: add a test trying to create a stream on share without streams support
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15161

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 3dcdab86f13fabb7a8c6ce71c59a565287d11244)
2022-09-06 07:05:50 +00:00
Ralph Boehme
f3886349ec 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

(cherry picked from commit 6d493a9d568c08cfe5242821ccbd5a5ee1fe5284)
2022-09-06 07:05:50 +00:00
Ralph Boehme
5fff2048a4 smbtorture: check required access for SMB2-GETINFO
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9b2d28157107602fcbe659664cf9ca25f08bb30b)
2022-09-06 07:05:50 +00:00
Ralph Boehme
771aad3baa s4/libcli/smb2: avoid using smb2_composite_setpathinfo() in smb2_util_setatr()
smb2_composite_setpathinfo() uses SEC_FLAG_MAXIMUM_ALLOWED which can
have unwanted side effects like breaking oplocks if the effective access
includes [READ|WRITE]_DATA.

For changing the DOS attributes we only need SEC_FILE_WRITE_ATTRIBUTE. With this
change test_smb2_oplock_batch25() doesn't trigger an oplock break anymore.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15153

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 66e40690bdd41800a01333ce4243bd62ee2b1894)
2022-09-06 07:05:50 +00:00
Joseph Sutton
229d55eff3 WHATSNEW: Document new Protected Users group
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-09-05 14:49:00 +02:00
Stefan Metzmacher
8a7551c4ac WHATSNEW: add more added/updated parameters
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
2022-09-05 14:48:51 +02:00
Stefan Metzmacher
b3e0432760 WHATSNEW: Make MIT Kerberos 1.20 updates clearer
Make it clearer what also applies to Heimdal and what not.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
2022-09-05 14:43:34 +02:00
Noel Power
e9c554c0a6 s3/winbindd: Fix bad access to sid array (with debug level >= info)
==6436==    at 0xA85F95B: dom_sid_string_buf (dom_sid.c:444)
==6436==    by 0xA85FBF2: dom_sid_str_buf (dom_sid.c:515)
==6436==    by 0x17EDF8: wb_lookupusergroups_recv (wb_lookupusergroups.c:115)
==6436==    by 0x17F964: wb_gettoken_gotgroups (wb_gettoken.c:123)
==6436==    by 0x56AD332: _tevent_req_notify_callback (tevent_req.c:141)
==6436==    by 0x56AD493: tevent_req_finish (tevent_req.c:193)
==6436==    by 0x56AD5C0: tevent_req_trigger (tevent_req.c:250)
==6436==    by 0x56AC119: tevent_common_invoke_immediate_handler (tevent_immediate.c:190)
==6436==    by 0x56AC268: tevent_common_loop_immediate (tevent_immediate.c:236)
==6436==    by 0x56B678A: epoll_event_loop_once (tevent_epoll.c:919)
==6436==    by 0x56B31C3: std_event_loop_once (tevent_standard.c:110)
==6436==    by 0x56AA621: _tevent_loop_once (tevent.c:825)
==6436==
==6436== Invalid read of size 1
==6436==    at 0xA85F95B: dom_sid_string_buf (dom_sid.c:444)
==6436==    by 0xA85FBF2: dom_sid_str_buf (dom_sid.c:515)
==6436==    by 0x17EDF8: wb_lookupusergroups_recv (wb_lookupusergroups.c:115)
==6436==    by 0x17F964: wb_gettoken_gotgroups (wb_gettoken.c:123)
==6436==    by 0x56AD332: _tevent_req_notify_callback (tevent_req.c:141)
==6436==    by 0x56AD493: tevent_req_finish (tevent_req.c:193)
==6436==    by 0x56AD5C0: tevent_req_trigger (tevent_req.c:250)
==6436==    by 0x56AC119: tevent_common_invoke_immediate_handler (tevent_immediate.c:190)
==6436==    by 0x56AC268: tevent_common_loop_immediate (tevent_immediate.c:236)
==6436==    by 0x56B678A: epoll_event_loop_once (tevent_epoll.c:919)
==6436==    by 0x56B31C3: std_event_loop_once (tevent_standard.c:110)
==6436==    by 0x56AA621: _tevent_loop_once (tevent.c:825)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15160
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 31 15:07:31 UTC 2022 on sn-devel-184

(cherry picked from commit 1788b59bc0aaa8f18186ad9b9945fbd634f02445)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Sat Sep  3 08:18:15 UTC 2022 on sn-devel-184
2022-09-03 08:18:15 +00:00
Jule Anger
3ba0c89f24 VERSION: Bump version up to Samba 4.17.0rc4...
and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2022-08-30 17:03:48 +02:00
Jule Anger
e6294461ad VERSION: Disable GIT_SNAPSHOT for the 4.17.0rc4 release.
Signed-off-by: Jule Anger <janger@samba.org>
samba-4.17.0rc4
2022-08-30 17:03:19 +02:00
Jule Anger
a7d399a32c WHATSNEW: Add release notes for Samba 4.17.0rc4.
Signed-off-by: Jule Anger <janger@samba.org>
2022-08-30 17:02:40 +02:00
Anoop C S
ffe95221aa vfs_glusterfs: Implement SMB_VFS_FSTATAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 26 17:33:15 UTC 2022 on sn-devel-184

(cherry picked from commit b7c460b902800c0156385b2edb82efb07f561c51)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Tue Aug 30 10:45:43 UTC 2022 on sn-devel-184
2022-08-30 10:45:43 +00:00
Anoop C S
d5831b0f09 vfs_glusterfs: Use glfs_fgetxattr() for SMB_VFS_GET_REAL_FILENAME_AT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 65f4c4e31e4cc60eb9ebca3858275a29f43d5e12)
2022-08-30 09:48:11 +00:00
Anoop C S
9d11c39a2b vfs_glusterfs: Use glfs_readlinkat() for SMB_VFS_READ_DFS_PATHAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 55548d7405ceca1d20e788a459e685c56f2ff139)
2022-08-30 09:48:11 +00:00
Anoop C S
5e26c570b7 vfs_glusterfs: Use glfs_symlinkat() for SMB_VFS_CREATE_DFS_PATHAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 310a908098b4ff3130a61594c15e91d5e561f357)
2022-08-30 09:48:11 +00:00
Anoop C S
5e155ea450 vfs_glusterfs: Use glfs_mknodat() for SMB_VFS_MKNODAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a4235200383fa4dc2f376ce042ed067a45f105d5)
2022-08-30 09:48:11 +00:00
Anoop C S
1d74f92deb vfs_glusterfs: Use glfs_linkat() for SMB_VFS_LINKAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 21654af5a5a062d831f7cb1efec1f1b1eb333bd2)
2022-08-30 09:48:11 +00:00
Anoop C S
894338eddb vfs_glusterfs: Use glfs_readlinkat() for SMB_VFS_READLINKAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 58b6cdabc0c3d788b407d3bfa46570311e910180)
2022-08-30 09:48:11 +00:00
Anoop C S
41eb80482b vfs_glusterfs: Use glfs_symlinkat() for SMB_VFS_SYMLINKAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b2746eb5fa64e0ec58e99eed5be10c98ea4e1c1e)
2022-08-30 09:48:11 +00:00
Anoop C S
c9b0459a17 vfs_glusterfs: Use glfs_unlinkat() for SMB_VFS_UNLINKAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2fa71202ab347fd057bb9b42740e57344e2679e1)
2022-08-30 09:48:11 +00:00
Anoop C S
618c868642 vfs_glusterfs: Use glfs_renameat() for SMB_VFS_RENAMEAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2b721ff22be04cea90086dde2a50f4287d075326)
2022-08-30 09:48:11 +00:00
Anoop C S
a41e308cf0 vfs_glusterfs: Use glfs_mkdirat() for SMB_VFS_MKDIRAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 56c4aab11190b8d48a5b92babea7fc7e78b54b4e)
2022-08-30 09:48:11 +00:00
Anoop C S
e0375100d7 vfs_glusterfs: Use glfs_openat() for SMB_VFS_OPENAT
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 184a9913241acd4f69128ced3370d3bf49b95f3b)
2022-08-30 09:48:11 +00:00
Anoop C S
a8eab50915 source3/wscript: Detect glusterfs-api with *at() calls support
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 3425fa0daf9e32d09c7716692cdfdffdc09856d7)
2022-08-30 09:48:11 +00:00
Anoop C S
9f04cb8f58 vfs_glusterfs: Accept fsp with const qualifier
This is in preparation to avoid any `const` qualifier being discarded
warning with future changes to various *_at() calls which has `const
file_struct` arguments.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15157

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 5f51fa9c07e194bcc3c4f39a1bfc2e01139c917b)
2022-08-30 09:48:11 +00:00
Jule Anger
fbd69dab91 VERSION: Bump version up to Samba 4.17.0rc4...
and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2022-08-23 16:44:18 +02:00
Jule Anger
c15dfcca9f VERSION: Disable GIT_SNAPSHOT for the 4.17.0rc3 release.
Signed-off-by: Jule Anger <janger@samba.org>
samba-4.17.0rc3
2022-08-23 16:44:12 +02:00
Jule Anger
d9f7e8d41b WHATSNEW: Add release notes for Samba 4.17.0rc3.
Signed-off-by: Jule Anger <janger@samba.org>
2022-08-23 16:44:07 +02:00
Ralph Boehme
4d37152c66 smbd: directly pass fsp to SMB_VFS_FGETXATTR() in fget_ea_dos_attribute()
We're now consistently passing the base_fsp to SMB_VFS_FSET_DOS_ATTRIBUTES(), so
we don't need to check for a stream_fsp here anymore.

Additionally vfs_default will assert a non-stream fsp inside
vfswrap_fgetxattr(), so in case any caller wrongly passes a stream fsp, this is
caught in vfs_default.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 968a5ae89f0d0da219e7dd05dd1f7f7c96dbb910)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Tue Aug 23 14:26:49 UTC 2022 on sn-devel-184
2022-08-23 14:26:49 +00:00
Ralph Boehme
25d6dcd889 smbd: add and use vfs_fget_dos_attributes()
Commit d71ef1365cdde47aeb3465699181656b0655fa04 caused a regression where the
creation date on streams wasn't updated anymore on the stream fsp.

By adding a simple wrapper vfs_fget_dos_attributes() that takes care of

- passing only the base_fsp to the VFS, so the VFS can be completely agnostic of
  all the streams related complexity like fake fds,

- propagating any updated btime from the base_fsp->fsp_name to the
  stream_fsp->fsp_name

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3f7d8db9945a325020e4d1574289dea9e8331c29)
2022-08-23 13:29:09 +00:00
Ralph Boehme
9df07ee0fa smbtorture: add test smb2.stream.attributes2
Specifically torture the creation date is the same for the file and its streams.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e74b10e17ee5df0f77ac5349242841be8d71c4e8)
2022-08-23 13:29:09 +00:00
Ralph Boehme
81be412fb0 smbtorture: rename smb2.streams.attributes to smb2.streams.attributes1
A subsequent commit adds another streams test named "attributes2", this change
avoids matching the new testname with the existing knownfail entries.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b5848d391be4f7633745d9c36e432ac8b1c9dba2)
2022-08-23 13:29:09 +00:00
Ralph Boehme
0d0eff6605 vfs_default: assert all passed in fsp's and names are non-stream type
Enforce fsp is a non-stream one in as many VFS operations as possible in
vfs_default. We really need an assert here instead of returning an error, as
otherwise he can have very hard to diagnose bugs.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 10 16:32:35 UTC 2022 on sn-devel-184

(cherry picked from commit fc45fcfde51b0b0bdcd524c82a0f9eabf7273045)
2022-08-23 13:29:09 +00:00
Ralph Boehme
f2272106f3 vfs_streams_xattr: restrict which fcntl's are allowed on streams
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 51243e3849736acbbf1d8f52cc02cdec5995fde4)
2022-08-23 13:29:09 +00:00
Ralph Boehme
aca819549c smbd: skip access checks for stat-opens on streams in open_file()
For streams, access is already checked in create_file_unixpath() by
check_base_file_access().

We already skip the access check in this function when doing an IO open of a
file, see above in open_file(), also skip it for "stat opens".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit f0299abf1b28a14518328710d9f84bef17fd2ecf)
2022-08-23 13:29:09 +00:00
Ralph Boehme
7c713f386f smbd: use metadata_fsp() in get_acl_group_bits()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 06555c6bcb5644fc9eea35b3cbae8d8801c65ab6)
2022-08-23 13:29:09 +00:00
Ralph Boehme
107af8fd98 smbd: ignore request to set the SPARSE attribute on streams
As per MS-FSA 2.1.1.5 this is a per stream attribute, but our backends don't
support it in a consistent way, therefor just pretend success and ignore the
request.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 3af8f8e8741cc8c889bbf416ccd38a1b702917ec)
2022-08-23 13:29:09 +00:00
Ralph Boehme
69742bab66 smbd: use metadata_fsp() with SMB_VFS_FSET_DOS_ATTRIBUTES()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 55e55804bb2d0f21c1bbe207257bb40555f3b7a2)
2022-08-23 13:29:09 +00:00
Ralph Boehme
814fd4e8e8 smbd: use metadata_fsp() with SMB_VFS_FGET_DOS_ATTRIBUTES()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 03b9ce84736d536ab2dd8a5ce1a2656e6a90c8c8)
2022-08-23 13:29:09 +00:00
Ralph Boehme
1434b66f2a smbd: use metadata_fsp() with SMB_VFS_FSET_NT_ACL()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 4ab29e2a345b48ebba652d5154e96adf954a6757)
2022-08-23 13:29:09 +00:00