[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Wed Apr 7 17:33:01 UTC 2021
The branch, master has been updated
via 4a41d970b47 Update status of SMB_VFS_REMOVEXATTR
via 38a06183af2 VFS: Remove SMB_VFS_REMOVEXATTR, no longer used
via 721c604d289 s3: VFS: unityed_media: Remove um_removexattr(). No longer called.
via ff9ab093309 s3: VFS: time_audit: Remove smb_time_audit_removexattr(). No longer called.
via a1afcc0720e s3: VFS: snapper: Remove snapper_gmt_removexattr(). No longer called.
via b88d3473887 s3: VFS: shadow_copy2: Remove shadow_copy2_removexattr(). No longer called.
via b9a5cd874d4 s3: VFS: posix_eadb: Remove posix_eadb_removexattr(). No longer called.
via e12449e047e s3: VFS: media_harmony: Remove mh_removexattr(). No longer called.
via f227fd22a64 s3: VFS: glusterfs: Remove vfs_gluster_removexattr(). No longer called.
via 699c829bec8 s3: VFS: full_audit: Remove smb_full_audit_removexattr(). No longer called.
via 469e7dc236c s3: VFS: ceph_snapshots: Remove ceph_snap_gmt_removexattr(). No longer called.
via 899f520eb9d s3: VFS: ceph: Remove cephwrap_removexattr(). No longer called.
via 2e8e6c31e45 s3: VFS: catia: Remove catia_removexattr(). No longer called.
via ce9b1698f92 s3: VFS: cap: Remove cap_removexattr(). No longer called.
via b0e34a47d44 s3: VFS: xattr_tdb: Remove xattr_tdb_removexattr(). No longer called.
via b2a06e71cad s3: VFS: vxfs: Remove vxfs_remove_xattr() - no longer called.
via 14ac9296c96 s3: torture: Change cmd_removexattr to use SMB_VFS_FREMOVEXATTR().
via 4f977b61e90 s3: smbd: Change SMB_VFS_REMOVEXATTR -> SMB_VFS_FREMOVEXATTR.
via 3b0778be143 VFS: posixacl_xattr: In posixacl_xattr_acl_delete_def_file() change SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR().
via f6cd9a548fa VFS: streams_xattr: In streams_xattr_renameat(), change SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR().
via 4d978b940e7 lib: adouble: Use FREMOVEXATTR in preference to REMOVEXATTR.
via bee6b16ce41 VFS: fake_acls: Clean up fake_acls_sys_acl_delete_def_file().
via 0c335a325d8 VFS: gluster: Allow vfs_gluster_fremovexattr() to cope with pathref fsps.
via ea1b763b6a6 VFS: ceph: Allow cephwrap_fremovexattr() to cope with pathref fsps.
via a2fd9df127a VFS: nfs4acl_xattr: Change nfs4acl_validate_blob() to use the fsp instead of the name.
via b094144abbc VFS: nfs4acl_xattr: Ensure remove smb_fname argument from nfs4acl_get_blob().
via 9f80f787e0d VFS: nfs4acl_xattr: Ensure nfs4acl_get_blob() always gets a valid fsp pointer.
from d590d9130ee s3: smbd: Fix parent_pathref() to cope with symlink parents.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4a41d970b4717e717911b5096cb8fee22a0802c4
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:36:39 2021 -0700
Update status of SMB_VFS_REMOVEXATTR
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Wed Apr 7 17:32:07 UTC 2021 on sn-devel-184
commit 38a06183af20684706e10294ef5499e2c486bb03
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:33:46 2021 -0700
VFS: Remove SMB_VFS_REMOVEXATTR, no longer used
---------------
/ \
/ REST \
/ IN \
/ PEACE \
/ \
| |
| SMB_VFS_REMOVEXATTR |
| |
| |
| 22 March |
| 2021 |
| |
| |
*| * * * | *
_________)/\\_//(\/(/\)/\//\/\////|_)_______
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 721c604d289b0d1784299d372253653b86cc35d9
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:21:00 2021 -0700
s3: VFS: unityed_media: Remove um_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit ff9ab093309d127cde497a29f24a702e978b49c0
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:14:25 2021 -0700
s3: VFS: time_audit: Remove smb_time_audit_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit a1afcc0720e374d8fbc24db1097d082d00493925
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:13:15 2021 -0700
s3: VFS: snapper: Remove snapper_gmt_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b88d347388735657602a9e50a55c9265ffbe97b4
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:05:02 2021 -0700
s3: VFS: shadow_copy2: Remove shadow_copy2_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b9a5cd874d46ddfd3e486124cea4428b66e52f45
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 12:02:08 2021 -0700
s3: VFS: posix_eadb: Remove posix_eadb_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e12449e047e6487f6587fd5e4b9c60e0f08826ea
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:54:14 2021 -0700
s3: VFS: media_harmony: Remove mh_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit f227fd22a64aac0e71fd4234df1e5bc1c6ef5864
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:46:11 2021 -0700
s3: VFS: glusterfs: Remove vfs_gluster_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 699c829bec895293132361c316c97dded2a8a828
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:34:02 2021 -0700
s3: VFS: full_audit: Remove smb_full_audit_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 469e7dc236c79ae48535daeab9ec775b58994f3d
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:20:07 2021 -0700
s3: VFS: ceph_snapshots: Remove ceph_snap_gmt_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 899f520eb9d0cb97c4e050b00084cf88f55f944b
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:14:16 2021 -0700
s3: VFS: ceph: Remove cephwrap_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 2e8e6c31e459776c1e9c1df76748c6882f6804fb
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 22 11:13:14 2021 -0700
s3: VFS: catia: Remove catia_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit ce9b1698f9290aa73eacf073c4815d7a9fb8b5d4
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 19 14:22:24 2021 -0700
s3: VFS: cap: Remove cap_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b0e34a47d4492280a46bc20b03fb287c741d3ade
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 19 14:04:22 2021 -0700
s3: VFS: xattr_tdb: Remove xattr_tdb_removexattr(). No longer called.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b2a06e71cad98b730d26ca0cb9ebe7eb516a10a9
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 19 14:02:17 2021 -0700
s3: VFS: vxfs: Remove vxfs_remove_xattr() - no longer called.
Also remove supporting function from lib_vxfs.c.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 14ac9296c96ea3177b1b57a0dcfc7a1bff961efa
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 19 13:12:12 2021 -0700
s3: torture: Change cmd_removexattr to use SMB_VFS_FREMOVEXATTR().
The last user of SMB_VFS_REMOVEXATTR() is gone, I can now
remove the internal VFS functions implementing it.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 4f977b61e906d0b9f68daa646cb0ff656a3768d2
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 13:42:31 2021 -0800
s3: smbd: Change SMB_VFS_REMOVEXATTR -> SMB_VFS_FREMOVEXATTR.
We no longer need pathname based xattr remove.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 3b0778be143245c4fc748abb421f550b863461ff
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 12 14:47:37 2021 -0800
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit f6cd9a548fa646a7916ce424b8242f1fd6ffc543
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 12 14:36:49 2021 -0800
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 4d978b940e751143d7e47aadbc58e2e53aa0ca20
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 12 14:33:14 2021 -0800
lib: adouble: Use FREMOVEXATTR in preference to REMOVEXATTR.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit bee6b16ce41092659e84015e22ad618c63955a48
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 11 16:36:09 2021 -0800
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 0c335a325d8ffcc71543d9e8503a47496dc6afb7
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 12 14:19:28 2021 -0800
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit ea1b763b6a6785f6dacd0d264948f32ab1ba6f92
Author: Jeremy Allison <jra at samba.org>
Date: Fri Mar 12 14:16:05 2021 -0800
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit a2fd9df127a775f0554a2aeab173605a615ffa89
Author: Jeremy Allison <jra at samba.org>
Date: Thu Apr 1 13:33:35 2021 -0700
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b094144abbce1ba154454ec1e7877f57a08f2377
Author: Jeremy Allison <jra at samba.org>
Date: Thu Apr 1 13:22:15 2021 -0700
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 9f80f787e0d42365fac410a2ea042698e4b5ba13
Author: Jeremy Allison <jra at samba.org>
Date: Thu Apr 1 13:16:34 2021 -0700
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 at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
examples/VFS/skel_opaque.c | 9 ---
examples/VFS/skel_transparent.c | 8 ---
source3/include/vfs.h | 10 +--
source3/include/vfs_macros.h | 5 --
source3/lib/adouble.c | 3 +-
source3/modules/The_New_VFS.org | 2 +-
source3/modules/The_New_VFS.txt | 2 +-
source3/modules/lib_vxfs.c | 21 -------
source3/modules/posixacl_xattr.c | 3 +-
source3/modules/vfs_cap.c | 40 ------------
source3/modules/vfs_catia.c | 58 -----------------
source3/modules/vfs_ceph.c | 27 ++++----
source3/modules/vfs_ceph_snapshots.c | 22 -------
source3/modules/vfs_default.c | 8 ---
source3/modules/vfs_fake_acls.c | 21 +------
source3/modules/vfs_full_audit.c | 19 ------
source3/modules/vfs_glusterfs.c | 23 ++++---
source3/modules/vfs_media_harmony.c | 33 ----------
source3/modules/vfs_nfs4acl_xattr.c | 113 ++++++++++++++++++++++------------
source3/modules/vfs_not_implemented.c | 9 ---
source3/modules/vfs_posix_eadb.c | 12 ----
source3/modules/vfs_shadow_copy2.c | 21 -------
source3/modules/vfs_snapper.c | 21 -------
source3/modules/vfs_streams_xattr.c | 11 +++-
source3/modules/vfs_time_audit.c | 22 -------
source3/modules/vfs_unityed_media.c | 29 ---------
source3/modules/vfs_vxfs.c | 52 ----------------
source3/modules/vfs_vxfs.h | 1 -
source3/modules/vfs_xattr_tdb.c | 28 ---------
source3/smbd/trans2.c | 18 ++----
source3/smbd/vfs.c | 8 ---
source3/torture/cmd_vfs.c | 24 +++++---
32 files changed, 134 insertions(+), 549 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 92ae46f7f5a..b58cfaffd22 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -933,14 +933,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
return -1;
}
-static int skel_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- errno = ENOSYS;
- return -1;
-}
-
static int skel_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
@@ -1120,7 +1112,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
.flistxattr_fn = skel_flistxattr,
- .removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
.fsetxattr_fn = skel_fsetxattr,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 93e5626f8ac..2a92cadd4e2 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -1226,13 +1226,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle,
return SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size);
}
-static int skel_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- return SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname, name);
-}
-
static int skel_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name)
{
@@ -1426,7 +1419,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
.flistxattr_fn = skel_flistxattr,
- .removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
.fsetxattr_fn = skel_fsetxattr,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 96477f27e89..678db0b861f 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -345,6 +345,7 @@
* Change to Version 45 - will ship with 4.15
* Version 45 - Remove SMB_VFS_LISTXATTR
* Version 45 - Remove SMB_VFS_SETXATTR
+ * Version 45 - Remove SMB_VFS_REMOVEXATTR
*/
#define SMB_VFS_INTERFACE_VERSION 45
@@ -1248,9 +1249,6 @@ struct vfs_fn_pointers {
uint8_t **xattr_value);
ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
- int (*removexattr_fn)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name);
int (*fremovexattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name);
int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
@@ -1765,9 +1763,6 @@ ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size);
-int smb_vfs_call_removexattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name);
int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name);
int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
@@ -2177,9 +2172,6 @@ ssize_t vfs_not_implemented_listxattr(vfs_handle_struct *handle,
ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size);
-int vfs_not_implemented_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name);
int vfs_not_implemented_fremovexattr(vfs_handle_struct *handle,
struct files_struct *fsp, const char *name);
int vfs_not_implemented_setxattr(vfs_handle_struct *handle,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index dab0c306a68..fe26c8fa347 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -551,11 +551,6 @@
#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
smb_vfs_call_flistxattr((handle)->next,(fsp),(list),(size))
-#define SMB_VFS_REMOVEXATTR(conn,smb_fname,name) \
- smb_vfs_call_removexattr((conn)->vfs_handles,(smb_fname),(name))
-#define SMB_VFS_NEXT_REMOVEXATTR(handle,smb_fname,name) \
- smb_vfs_call_removexattr((handle)->next,(smb_fname),(name))
-
#define SMB_VFS_FREMOVEXATTR(fsp,name) \
smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name))
#define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c
index 39895aff3f8..8a34d6ba074 100644
--- a/source3/lib/adouble.c
+++ b/source3/lib/adouble.c
@@ -2099,8 +2099,7 @@ exit:
ealen = -1;
if (errno == EINVAL) {
become_root();
- (void)SMB_VFS_REMOVEXATTR(handle->conn,
- smb_fname,
+ (void)SMB_VFS_FREMOVEXATTR(smb_fname->fsp,
AFPINFO_EA_NETATALK);
unbecome_root();
errno = ENOENT;
diff --git a/source3/modules/The_New_VFS.org b/source3/modules/The_New_VFS.org
index 82ba2ea2519..afb2ed84f1c 100644
--- a/source3/modules/The_New_VFS.org
+++ b/source3/modules/The_New_VFS.org
@@ -276,7 +276,7 @@ whenever VFS access is done in a piecemeal fashion.
| SMB_VFS_READLINKAT() | [[Symlink][Symlink]] | - |
| SMB_VFS_REALPATH() | [[P2px][P2px]] | - |
| SMB_VFS_RECVFILE() | [[fsp][fsp]] | - |
-| SMB_VFS_REMOVEXATTR() | [[Path][Path]] | Todo |
+| SMB_VFS_REMOVEXATTR() | [[Path][Path]] | - |
| SMB_VFS_RENAMEAT() | [[Path][Path]] | Todo |
| SMB_VFS_REWINDDIR() | [[fsp][fsp]] | - |
| SMB_VFS_SEEKDIR() | [[fsp][fsp]] | - |
diff --git a/source3/modules/The_New_VFS.txt b/source3/modules/The_New_VFS.txt
index 711bfee4413..ecff08972d0 100644
--- a/source3/modules/The_New_VFS.txt
+++ b/source3/modules/The_New_VFS.txt
@@ -344,7 +344,7 @@ Table of Contents
SMB_VFS_READLINKAT() [Symlink] -
SMB_VFS_REALPATH() [P2px] -
SMB_VFS_RECVFILE() [fsp] -
- SMB_VFS_REMOVEXATTR() [Path] Todo
+ SMB_VFS_REMOVEXATTR() [Path] -
SMB_VFS_RENAMEAT() [Path] Todo
SMB_VFS_REWINDDIR() [fsp] -
SMB_VFS_SEEKDIR() [fsp] -
diff --git a/source3/modules/lib_vxfs.c b/source3/modules/lib_vxfs.c
index 13b2e612a27..432eadd1865 100644
--- a/source3/modules/lib_vxfs.c
+++ b/source3/modules/lib_vxfs.c
@@ -121,27 +121,6 @@ int vxfs_removexattr_fd(int fd, const char *name)
return ret;
}
-int vxfs_removexattr_path(const char *path, const char *name, bool is_dir)
-{
- int ret, fd = -1;
-
- if (is_dir) {
- fd = open(path, O_RDONLY|O_DIRECTORY);
- } else {
- fd = open(path, O_WRONLY);
- }
- if (fd == -1) {
- DEBUG(10, ("file not opened: vxfs_removexattr_path for %s\n",
- path));
- return -1;
- }
-
- ret = vxfs_removexattr_fd(fd, name);
- close(fd);
-
- return ret;
-}
-
int vxfs_listxattr_fd(int fd, char *list, size_t size)
{
int ret;
diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c
index a835f2e5ebe..6b0407b66ff 100644
--- a/source3/modules/posixacl_xattr.c
+++ b/source3/modules/posixacl_xattr.c
@@ -515,7 +515,6 @@ int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
int posixacl_xattr_acl_delete_def_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
- return SMB_VFS_REMOVEXATTR(handle->conn,
- smb_fname,
+ return SMB_VFS_FREMOVEXATTR(smb_fname->fsp,
ACL_EA_DEFAULT);
}
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 4c65361e4e2..372acff5918 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -910,45 +910,6 @@ static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp
return SMB_VFS_NEXT_FGETXATTR(handle, fsp, cappath, value, size);
}
-static int cap_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- struct smb_filename *cap_smb_fname = NULL;
- char *cappath = capencode(talloc_tos(), smb_fname->base_name);
- char *capname = capencode(talloc_tos(), name);
- int ret;
- int saved_errno = 0;
-
- if (!cappath || !capname) {
- errno = ENOMEM;
- return -1;
- }
- cap_smb_fname = synthetic_smb_fname(talloc_tos(),
- cappath,
- NULL,
- NULL,
- smb_fname->twrp,
- smb_fname->flags);
- if (cap_smb_fname == NULL) {
- TALLOC_FREE(cappath);
- TALLOC_FREE(capname);
- errno = ENOMEM;
- return -1;
- }
- ret = SMB_VFS_NEXT_REMOVEXATTR(handle, cap_smb_fname, capname);
- if (ret == -1) {
- saved_errno = errno;
- }
- TALLOC_FREE(cappath);
- TALLOC_FREE(capname);
- TALLOC_FREE(cap_smb_fname);
- if (saved_errno) {
- errno = saved_errno;
- }
- return ret;
-}
-
static int cap_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *path)
{
char *cappath = capencode(talloc_tos(), path);
@@ -1071,7 +1032,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = cap_fgetxattr,
- .removexattr_fn = cap_removexattr,
.fremovexattr_fn = cap_fremovexattr,
.fsetxattr_fn = cap_fsetxattr,
.create_dfs_pathat_fn = cap_create_dfs_pathat,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 8e648816c68..de291ba7c31 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -1241,63 +1241,6 @@ catia_getxattr(vfs_handle_struct *handle,
return ret;
}
-static int
-catia_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- struct smb_filename *mapped_smb_fname = NULL;
- char *mapped_name = NULL;
- char *mapped_ea_name = NULL;
- NTSTATUS status;
- ssize_t ret;
- int saved_errno = 0;
-
- status = catia_string_replace_allocate(handle->conn,
- smb_fname->base_name,
- &mapped_name,
- vfs_translate_to_unix);
- if (!NT_STATUS_IS_OK(status)) {
- errno = map_errno_from_nt_status(status);
- return -1;
- }
-
- status = catia_string_replace_allocate(handle->conn,
- name, &mapped_ea_name, vfs_translate_to_unix);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(mapped_name);
- errno = map_errno_from_nt_status(status);
- return -1;
- }
-
- mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
- mapped_name,
- NULL,
- &smb_fname->st,
- smb_fname->twrp,
- smb_fname->flags);
- if (mapped_smb_fname == NULL) {
- TALLOC_FREE(mapped_name);
- TALLOC_FREE(mapped_ea_name);
- errno = ENOMEM;
- return -1;
- }
-
- ret = SMB_VFS_NEXT_REMOVEXATTR(handle, mapped_smb_fname,
- mapped_ea_name);
- if (ret == -1) {
- saved_errno = errno;
- }
- TALLOC_FREE(mapped_name);
- TALLOC_FREE(mapped_ea_name);
- TALLOC_FREE(mapped_smb_fname);
- if (saved_errno != 0) {
- errno = saved_errno;
- }
-
- return ret;
-}
-
static int catia_fstat(vfs_handle_struct *handle,
files_struct *fsp,
SMB_STRUCT_STAT *sbuf)
@@ -2327,7 +2270,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.getxattr_fn = catia_getxattr,
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
- .removexattr_fn = catia_removexattr,
.fgetxattr_fn = catia_fgetxattr,
.flistxattr_fn = catia_flistxattr,
.fremovexattr_fn = catia_fremovexattr,
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 038258a1d8d..634222df764 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1307,23 +1307,23 @@ static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct file
return (ssize_t)ret;
}
-static int cephwrap_removexattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- int ret;
- DBG_DEBUG("[CEPH] removexattr(%p, %s, %s)\n", handle,
- smb_fname->base_name, name);
- ret = ceph_removexattr(handle->data, smb_fname->base_name, name);
- DBG_DEBUG("[CEPH] removexattr(...) = %d\n", ret);
- WRAP_RETURN(ret);
-}
-
static int cephwrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
{
int ret;
DBG_DEBUG("[CEPH] fremovexattr(%p, %p, %s)\n", handle, fsp, name);
- ret = ceph_fremovexattr(handle->data, fsp_get_io_fd(fsp), name);
+ if (!fsp->fsp_flags.is_pathref) {
+ /*
+ * We can use an io_fd to remove xattrs.
+ */
+ ret = ceph_fremovexattr(handle->data, fsp_get_io_fd(fsp), name);
+ } else {
+ /*
+ * This is no longer a handle based call.
+ */
+ ret = ceph_removexattr(handle->data,
+ fsp->fsp_name->base_name,
+ name);
+ }
DBG_DEBUG("[CEPH] fremovexattr(...) = %d\n", ret);
WRAP_RETURN(ret);
}
@@ -1605,7 +1605,6 @@ static struct vfs_fn_pointers ceph_fns = {
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = cephwrap_fgetxattr,
.flistxattr_fn = cephwrap_flistxattr,
- .removexattr_fn = cephwrap_removexattr,
.fremovexattr_fn = cephwrap_fremovexattr,
.fsetxattr_fn = cephwrap_fsetxattr,
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index 3211c1c7dce..7b2307b19ee 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -1298,27 +1298,6 @@ static ssize_t ceph_snap_gmt_getxattr(vfs_handle_struct *handle,
return ret;
}
-static int ceph_snap_gmt_removexattr(vfs_handle_struct *handle,
- const struct smb_filename *csmb_fname,
- const char *aname)
-{
- time_t timestamp = 0;
- int ret;
-
- ret = ceph_snap_gmt_strip_snapshot(handle,
- csmb_fname,
- ×tamp, NULL, 0);
- if (ret < 0) {
- errno = -ret;
- return -1;
- }
- if (timestamp != 0) {
- errno = EROFS;
- return -1;
- }
- return SMB_VFS_NEXT_REMOVEXATTR(handle, csmb_fname, aname);
-}
-
static int ceph_snap_gmt_fsetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *aname, const void *value,
@@ -1492,7 +1471,6 @@ static struct vfs_fn_pointers ceph_snap_fns = {
.getxattr_fn = ceph_snap_gmt_getxattr,
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
- .removexattr_fn = ceph_snap_gmt_removexattr,
.fsetxattr_fn = ceph_snap_gmt_fsetxattr,
.chflags_fn = ceph_snap_gmt_chflags,
.get_real_filename_fn = ceph_snap_gmt_get_real_filename,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 9a2c13d743b..a3557fe2d14 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -3636,13 +3636,6 @@ static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files
return listxattr(fsp->fsp_name->base_name, list, size);
}
-static int vfswrap_removexattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- const char *name)
-{
- return removexattr(smb_fname->base_name, name);
-}
-
static int vfswrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
{
int fd = fsp_get_pathref_fd(fsp);
@@ -3877,7 +3870,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.getxattrat_recv_fn = vfswrap_getxattrat_recv,
.fgetxattr_fn = vfswrap_fgetxattr,
.flistxattr_fn = vfswrap_flistxattr,
- .removexattr_fn = vfswrap_removexattr,
.fremovexattr_fn = vfswrap_fremovexattr,
.fsetxattr_fn = vfswrap_fsetxattr,
diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c
index 716df540e47..08e7b667149 100644
--- a/source3/modules/vfs_fake_acls.c
+++ b/source3/modules/vfs_fake_acls.c
@@ -385,39 +385,22 @@ static int fake_acls_sys_acl_set_fd(vfs_handle_struct *handle,
}
static int fake_acls_sys_acl_delete_def_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname_in)
+ const struct smb_filename *smb_fname)
{
int ret;
const char *name = FAKE_ACL_DEFAULT_XATTR;
- TALLOC_CTX *frame = talloc_stackframe();
- struct smb_filename *smb_fname = cp_smb_filename_nostream(talloc_tos(),
- smb_fname_in);
-
- if (smb_fname == NULL) {
- TALLOC_FREE(frame);
- errno = ENOMEM;
- return -1;
- }
-
- ret = SMB_VFS_NEXT_STAT(handle, smb_fname);
- if (ret == -1) {
- TALLOC_FREE(frame);
- return -1;
- }
if (!S_ISDIR(smb_fname->st.st_ex_mode)) {
errno = EINVAL;
- TALLOC_FREE(frame);
return -1;
}
- ret = SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname, name);
+ ret = SMB_VFS_NEXT_FREMOVEXATTR(handle, smb_fname->fsp, name);
if (ret == -1 && errno == ENOATTR) {
ret = 0;
errno = 0;
}
- TALLOC_FREE(frame);
return ret;
}
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index ee26c6a5bfa..bbe5ea55dde 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -2838,24 +2838,6 @@ static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_full_audit_removexattr(struct vfs_handle_struct *handle,
--
Samba Shared Repository
More information about the samba-cvs
mailing list