1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

3648 Commits

Author SHA1 Message Date
Noel Power
f4e1598bbb s3/modules: VFS: audit: Remove audit_chmod
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
d87123648b s3/modules: VFS: acl_common: Remove chmod_acl_module_common() function
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
a773d5e321 s3/modules: VFS: acl_xattr: Remove call to chmod_acl_module_common()
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
726160a8ae s3/modules: VFS: acl_tdb: Remove call to chmod_acl_module_common()
Signed-off-by: Noel Power <noel.power@suse.com>
2021-04-11 22:27:34 +00:00
Noel Power
dda3d953a0 s3/modules: linux_xfs_sgid_mkdirat() SMB_VFS_NEXT_FCHMOD => SMB_VFS_NEXT_CHMOD
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
cb571d2b47 s3/modules: nfs4acl_xattr_fset_nt_acl VFS_SMB_NEXT_CHMOD => VFS_SMB_NEXT_FCHMOD
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
7501407f98 s3/modules: VFS: snapper: Add new fchmod_fn implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
a412b5cc79 s3/modules: VFS: shadow_copy2: Add new fchmod_fn implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
f54ec00eca s3/modules: VFS: fruit: Add new fchmod_fn implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
c1e9aea0da s3/modules: VFS: ceph_snapshots: Add new fchmod_fn implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
74ecb46707 s3/modules: make chmod_acl_module_common less strict so fchmod can run
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
a749da2a5d VFS: ceph: Allow cephwrap_fchmod() to cope with pathref fsps.
Ensure it only uses an io fd for a handle based call.

Otherwise fall back to pathname based.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Noel Power
fcf696bfa2 VFS: gluster: Allow vfs_gluster_fchmod() to cope with pathref fsps.
Ensure it only uses an io fd for a handle based call.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Ralph Boehme
6ad10836d6 s3/modules: fchmod: fallback to path based chmod if pathref
Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Ralph Boehme
f923d1f474 vfs_default: require fchmod()
This has been part of POSIX for long enough in 2021.

Signed-off-by: Ralph Boehme <slow@samba.org>
2021-04-11 22:27:34 +00:00
Jeremy Allison
9386e6ef5d s3: VFS: streams_xattr: Now we know we will never be doing ACL operations on streams, delete the now unneeded code.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr  9 20:48:17 UTC 2021 on sn-devel-184
2021-04-09 20:48:17 +00:00
Noel Power
0332ddde1a VFS: Remove SMB_VFS_SET_DOS_ATTRIBUTE, no longer used
-------------------
                             /                   \
                            /        REST         \
                           /          IN           \
                          /          PEACE          \
                         /                           \
                         |                           |
                         | SMB_VFS_SET_DOS_ATTRIBUTE |
                         |                           |
                         |                           |
                         |         3 March           |
                         |           2021            |
                         |                           |
                         |                           |
                        *|      *  *  *        * *   | *
                _________)/\\_//(\/(/\)/\//\/\////\\/|_)_______
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  8 18:38:40 UTC 2021 on sn-devel-184
2021-04-08 18:38:40 +00:00
Jeremy Allison
4a41d970b4 Update status of SMB_VFS_REMOVEXATTR
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Apr  7 17:32:07 UTC 2021 on sn-devel-184
2021-04-07 17:32:07 +00:00
Jeremy Allison
38a06183af VFS: Remove SMB_VFS_REMOVEXATTR, no longer used
---------------
                                      /               \
                                     /      REST       \
                                    /        IN         \
                                   /        PEACE        \
                                  /                       \
                                  |                       |
                                  |  SMB_VFS_REMOVEXATTR  |
                                  |                       |
                                  |                       |
                                  |       22 March        |
                                  |         2021          |
                                  |                       |
                                  |                       |
                                 *|     *  *  *           | *
                        _________)/\\_//(\/(/\)/\//\/\////|_)_______

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
721c604d28 s3: VFS: unityed_media: Remove um_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
ff9ab09330 s3: VFS: time_audit: Remove smb_time_audit_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
a1afcc0720 s3: VFS: snapper: Remove snapper_gmt_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
b88d347388 s3: VFS: shadow_copy2: Remove shadow_copy2_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
b9a5cd874d s3: VFS: posix_eadb: Remove posix_eadb_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
e12449e047 s3: VFS: media_harmony: Remove mh_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
f227fd22a6 s3: VFS: glusterfs: Remove vfs_gluster_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
699c829bec s3: VFS: full_audit: Remove smb_full_audit_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
469e7dc236 s3: VFS: ceph_snapshots: Remove ceph_snap_gmt_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
899f520eb9 s3: VFS: ceph: Remove cephwrap_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
2e8e6c31e4 s3: VFS: catia: Remove catia_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
ce9b1698f9 s3: VFS: cap: Remove cap_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
b0e34a47d4 s3: VFS: xattr_tdb: Remove xattr_tdb_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
b2a06e71ca s3: VFS: vxfs: Remove vxfs_remove_xattr() - no longer called.
Also remove supporting function from lib_vxfs.c.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
3b0778be14 VFS: posixacl_xattr: In posixacl_xattr_acl_delete_def_file() change SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR().
We know this is safe as SMB_VFS_SYS_ACL_DELETE_DEF_FILE() is only
ever called on an fsp->fsp_name.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
f6cd9a548f VFS: streams_xattr: In streams_xattr_renameat(), change SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR().
Note that now we're doing this by handle
not by pathname we must do it on the base_fsp,
as we have to remove the actual xattr on the base file.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
bee6b16ce4 VFS: fake_acls: Clean up fake_acls_sys_acl_delete_def_file().
Change SMB_VFS_NEXT_REMOVEXATTR() -> SMB_VFS_NEXT_FREMOVEXATTR().

It doesn't need to do STAT calls, it's always called
with an fsp->fsp_name smb_filename. This will change
later to a handle-based call.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
0c335a325d VFS: gluster: Allow vfs_gluster_fremovexattr() to cope with pathref fsps.
Ensure it only uses an io fd for a handle based call.

Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
ea1b763b6a VFS: ceph: Allow cephwrap_fremovexattr() to cope with pathref fsps.
Ensure it only uses an io fd for a handle based call.

Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
a2fd9df127 VFS: nfs4acl_xattr: Change nfs4acl_validate_blob() to use the fsp instead of the name.
Changes use of SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
b094144abb VFS: nfs4acl_xattr: Ensure remove smb_fname argument from nfs4acl_get_blob().
Now we know we always have a valid fsp, use it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Jeremy Allison
9f80f787e0 VFS: nfs4acl_xattr: Ensure nfs4acl_get_blob() always gets a valid fsp pointer.
This means adding a synthetic_pathref() call into the
nfs4acl_xattr version of SMB_VFS_GET_NT_ACL_AT() which
is the pathname-based ACL fetch call.

One place where this (smb_fname->fsp == NULL)
can happen is from open when checking parent
directory ACL - check_parent_access() currently
isn't always passed a smb_fname with a valid
fsp and check_parent_access() currently doesn't
open a pathref smb_fname->fsp itself (eventually
it should be passed in a pathref from the caller).

There are also a few other places inside smbd
that call smbd_check_access_rights() also without
a pathref fsp.

This check should be moved into the
callers inside smbd to ensure that smb_fname->fsp
is always valid here, and in a later patchset (not
part of this set) I will do just that.

Ultimately it may be possible to remove
pathname based SMB_VFS_GET_NT_ACL_AT(), this
requires further investigation.

But until then, we need this change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-04-07 16:26:28 +00:00
Stefan Metzmacher
2c194c0bc6 vfs_aio_pthread: don't allow async opens when multi channel is enabled.
We will get this supported later, but for now just disable async
opens as fsp->mid may not belong the first xconn of client->connections.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-29 19:36:37 +00:00
Volker Lendecke
a4235cdad2 vfs_ceph: Fix CID 1474440: Null pointer dereferences
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-24 20:31:30 +00:00
Jeremy Allison
321703fbea s3: vxfs: Remove unused vxfs_setxattr_path().
Missed when SMB_VFS_SETXATTR() was removed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>

Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Mon Mar 22 22:36:05 UTC 2021 on sn-devel-184
2021-03-22 22:36:05 +00:00
Jeremy Allison
9bb890a2af s3: vxfs: Remove unused vxfs_listxattr_path().
Missed when SMB_VFS_LISTXATTR() was removed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
2021-03-22 21:25:31 +00:00
Trever L. Adams
d6a16ad00e s3:modules:vfs_virusfilter: Recent New_VFS changes break vfs_virusfilter_openat.
The_New_VFS introduces several changes that broke vfs_virusfilter_openat. The assert to make sure certain checks would work broke.

This patch fixes those breaks and converts to the SMB_VFS_FSTAT_NEXT instead of SMB_VFS_STAT_NEXT.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14671
RN: vfs_virusfilter_openat support New_VFS FSTAT, avoid SMB_ASSERT(fsp_get_pathref_fd(dirfsp) == AT_FDCWD); problem.

Signed-off-by: Trever L. Adams" <trever.adams@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Mar 22 19:44:30 UTC 2021 on sn-devel-184
2021-03-22 19:44:30 +00:00
Jeremy Allison
4af9868142 s3: VFS: default: vfswrap_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_fsp anymore.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
2021-03-22 18:37:34 +00:00
Jeremy Allison
8f38f886ff s3: VFS: time_audit: Log full pathname as smb_time_audit_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_fsp anymore.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
2021-03-22 18:37:34 +00:00
Jeremy Allison
49bcb91339 s3: VFS: full_audit: Log full pathname as smb_full_audit_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_fsp anymore.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
2021-03-22 18:37:34 +00:00
Jeremy Allison
ea5c15358f s3: VFS: gluster: vfs_gluster_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_fsp anymore.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2021-03-22 18:37:34 +00:00