[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Feb 26 22:36:01 UTC 2021
The branch, master has been updated
via d6ddb8aa2a9 vfs: update status of SMB_VFS_LISTXATTR
via 46226cb219c VFS: Remove SMB_VFS_LISTXATTR, no longer used
via 1d1b80e5dc5 s3/smbd: Remove connection_struct from get_ea_names_from_file
via de83946311d s3/smbd: Adjust estimate_ea_size to take files_struct alone
via f958b6b86a8 s3/smbd: let canonicalize_ea_name accept fsp and fstring only in sig
via df447afa5b0 s3/smbd: replace get_ea_list_from_file_path with get_ea_list_from_fsp
via b9ea876fa48 s3/smbd: rename get_ea_list_from_fsp_new to get_ea_list_from_fsp
via 341abce363b s3/smbd: Create new file get_ea_list_from_fsp_new (not used)
via aaea5cc4153 s3/smbd: remove connection_struct from get_ea_list_from_file_path
via ac5de42e9ea s3/smsbd: prepare to remove connection_struct param from get_ea_list_from_file_path
via 435119c4950 s3/torture: migrate SMB_VFS_FLISTXATTR calls to SMB_VFS_FLISTXATTR
via 9c0660fb539 s3/smbd: remove connection_struct param from get_ea_list_from_file
via 0088d39b8f5 s3/smbd: rename get_ea_list_from_path -> get_ea_list_from_fsp
via 772b0a00649 s3/smbd: no longer pass smb_fname to get_ea_list_from_file
via 9e0b123eb8b s3/smbd: prepare get_ea_list_from_file to receive fsp alone
via 94c441c42e9 s3/smbd: modify get_ea_list_from_file_path fn signature to take fsp only
via eca6e43561a s3/smbd: modify estimate_ea_size fn signature to take fsp only
via 5cbab2ebfda s3/smbd: use smb_fname->fsp for get_ea_list_from_file_path in estimate_ea_size()
via dfc80b4ce80 s3/smbd: modify get_ea_names_from_file signature fn to take fsp alone
via 6d353212a5a s3/smbd: use SMB_VFS_FLISTXATTR() alone (also added assert fsp is not NULL)
via ecd9b751f17 s3/modules: Ensure vfs_streaminfo gets passed valid pathref smb_filename
via 22e0b538c3d s3/smbd: call get_ea_list_from_file with smb_fname->fsp
from 3d91fe071a2 s3: VFS: nfs4_acls. Add missing TALLOC_FREE(frame) in error path.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d6ddb8aa2a91de8b527709658f9a113e5b73377e
Author: Noel Power <noel.power at suse.com>
Date: Fri Feb 12 15:06:40 2021 +0000
vfs: update status of SMB_VFS_LISTXATTR
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Feb 26 22:35:04 UTC 2021 on sn-devel-184
commit 46226cb219c08928e2bda0e80e59099bf2370fc0
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 16:21:36 2021 +0000
VFS: Remove SMB_VFS_LISTXATTR, no longer used
---------------
/ \
/ REST \
/ IN \
/ PEACE \
/ \
| |
| SMB_VFS_LISTXATTR |
| |
| |
| 10 February |
| 2021 |
| |
| |
*| * * * | *
_________)/\\_//(\/(/\)/\//\/\////|_)_______
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1d1b80e5dc594e64f73db787a3ca0b5c3e3f11a7
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 12:46:09 2021 +0000
s3/smbd: Remove connection_struct from get_ea_names_from_file
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit de83946311d8c1f007c236751280e9f101cc3a29
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 11:54:29 2021 +0000
s3/smbd: Adjust estimate_ea_size to take files_struct alone
Remove connection_struct parameter (and use fsp->conn)
instead.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f958b6b86a85a479dc35cd8c1175d6218cfb6f60
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 10:26:53 2021 +0000
s3/smbd: let canonicalize_ea_name accept fsp and fstring only in sig
Remove the connection_struct & smb_fname parameters from
canonicalize_ea_name, they arent needed (and can be got from
files_struct)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit df447afa5b0bbb1ffa02539a16735b2cd1a800fd
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 10:13:46 2021 +0000
s3/smbd: replace get_ea_list_from_file_path with get_ea_list_from_fsp
Additionally remove the old get_ea_list_from_file_path.
get_ea_list_from_file_path & new get_ea_list_from_fsp are identical
except for test for an addition test
+ if (is_ntfs_stream_smb_fname(fsp->fsp_name)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
This test should should be fine here too.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit b9ea876fa48fa324223c77bbd589ee5fff189961
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 10:07:51 2021 +0000
s3/smbd: rename get_ea_list_from_fsp_new to get_ea_list_from_fsp
And remove the old get_ea_list_from_fsp
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 341abce363ba328ca828d7d614497dbdfd7af272
Author: Noel Power <noel.power at suse.com>
Date: Wed Feb 10 09:53:23 2021 +0000
s3/smbd: Create new file get_ea_list_from_fsp_new (not used)
On the way to removing get_ea_list_from_file_path and replacing
it with get_ea_list_from_fsp create a copy of get_ea_list_from_file_path
called get_ea_list_from_fsp_new. It is ifdef'ed out for the moment
as it isn't used yet
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit aaea5cc415348bf61d7636b83ac3b58aa22f020d
Author: Noel Power <noel.power at suse.com>
Date: Tue Feb 9 17:55:50 2021 +0000
s3/smbd: remove connection_struct from get_ea_list_from_file_path
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ac5de42e9eae5d139fd2a9eafa1fe5e30f4ac74e
Author: Noel Power <noel.power at suse.com>
Date: Tue Feb 9 17:55:08 2021 +0000
s3/smsbd: prepare to remove connection_struct param from get_ea_list_from_file_path
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 435119c49507f6c8693decacccf63fe8351413c4
Author: Noel Power <noel.power at suse.com>
Date: Fri Feb 5 17:10:20 2021 +0000
s3/torture: migrate SMB_VFS_FLISTXATTR calls to SMB_VFS_FLISTXATTR
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9c0660fb5399f0afe29ad456135a2e44216ff944
Author: Noel Power <noel.power at suse.com>
Date: Mon Feb 8 17:38:54 2021 +0000
s3/smbd: remove connection_struct param from get_ea_list_from_file
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 0088d39b8f5e4ebb04f2cd10ec413a0d24e58892
Author: Noel Power <noel.power at suse.com>
Date: Mon Feb 8 17:29:30 2021 +0000
s3/smbd: rename get_ea_list_from_path -> get_ea_list_from_fsp
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 772b0a00649e7b9a3824c1b18d37169b96ab9ad7
Author: Noel Power <noel.power at suse.com>
Date: Tue Feb 2 19:33:39 2021 +0000
s3/smbd: no longer pass smb_fname to get_ea_list_from_file
Finally remove the smb_fname paramater as it is no longer used
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9e0b123eb8be7d6480fcc5bf7480617d35e3114d
Author: Noel Power <noel.power at suse.com>
Date: Tue Feb 2 17:05:49 2021 +0000
s3/smbd: prepare get_ea_list_from_file to receive fsp alone
A step to transition away from using smb_fname & fsp
parameter combination with this function by using
the fsp provided by smb_filename->fsp
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 94c441c42e9b4a34c088e7cde5b30a05d03577b9
Author: Noel Power <noel.power at suse.com>
Date: Fri Feb 26 14:09:52 2021 +0000
s3/smbd: modify get_ea_list_from_file_path fn signature to take fsp only
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit eca6e43561a8a329f16fef5f29a5eee69fed17b4
Author: Noel Power <noel.power at suse.com>
Date: Mon Feb 1 21:09:08 2021 +0000
s3/smbd: modify estimate_ea_size fn signature to take fsp only
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 5cbab2ebfdad88080c060730979725f2c6fa40cc
Author: Noel Power <npower at quick-trouble.localdomain>
Date: Fri Jan 29 14:54:47 2021 +0000
s3/smbd: use smb_fname->fsp for get_ea_list_from_file_path in estimate_ea_size()
Additionally ensure get_ea_list_from_file_path is called with base file.
Previously fsp was set to NULL if fsp pointed to a ntfs stream which in
turn ensured that 'base_path' from the smb_fname was used (which points
to the base file). Now we get a pathref fsp (pointing to the base file)
instead
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit dfc80b4ce80a42e0c402ee7ba23e3cd2ad3ae279
Author: Noel Power <npower at quick-trouble.localdomain>
Date: Sun Jan 31 19:18:03 2021 +0000
s3/smbd: modify get_ea_names_from_file signature fn to take fsp alone
Removes the smb_filename function parameter
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 6d353212a5a9430b14c6fa239b206b7c6909b834
Author: Noel Power <npower at quick-trouble.localdomain>
Date: Fri Jan 29 14:53:43 2021 +0000
s3/smbd: use SMB_VFS_FLISTXATTR() alone (also added assert fsp is not NULL)
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ecd9b751f17bb0f73201989bb9116547fe7fc0da
Author: Noel Power <noel.power at suse.com>
Date: Mon Feb 8 10:42:22 2021 +0000
s3/modules: Ensure vfs_streaminfo gets passed valid pathref smb_filename
the smb_filename/smb_filename->fsp passed to vfs_streaminfo
eventually is passed to SMB_VFS_FLISTXATTR, we need to ensure this is
properly setup and not NULL
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 22e0b538c3da7804956346bd5c00501c046e644b
Author: Noel Power <npower at quick-trouble.localdomain>
Date: Fri Jan 29 18:54:20 2021 +0000
s3/smbd: call get_ea_list_from_file with smb_fname->fsp
A step to transition away from using smb_fname & fsp
paramater combination with this function.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
examples/VFS/skel_opaque.c | 10 --
examples/VFS/skel_transparent.c | 9 --
source3/include/vfs.h | 12 +--
source3/include/vfs_macros.h | 5 -
source3/modules/The_New_VFS.org | 2 +-
source3/modules/The_New_VFS.txt | 2 +-
source3/modules/vfs_cap.c | 38 --------
source3/modules/vfs_catia.c | 58 ++---------
source3/modules/vfs_ceph.c | 17 ----
source3/modules/vfs_ceph_snapshots.c | 42 --------
source3/modules/vfs_default.c | 9 --
source3/modules/vfs_full_audit.c | 21 ----
source3/modules/vfs_glusterfs.c | 9 --
source3/modules/vfs_media_harmony.c | 36 -------
source3/modules/vfs_not_implemented.c | 10 --
source3/modules/vfs_posix_eadb.c | 13 ---
source3/modules/vfs_shadow_copy2.c | 49 ----------
source3/modules/vfs_snapper.c | 50 ----------
source3/modules/vfs_streams_xattr.c | 4 +-
source3/modules/vfs_time_audit.c | 23 -----
source3/modules/vfs_unityed_media.c | 32 ------
source3/modules/vfs_vxfs.c | 25 -----
source3/modules/vfs_xattr_tdb.c | 29 ------
source3/smbd/filename.c | 31 +++++-
source3/smbd/nttrans.c | 4 +-
source3/smbd/open.c | 29 +++++-
source3/smbd/proto.h | 2 -
source3/smbd/trans2.c | 177 +++++++++++++---------------------
source3/smbd/vfs.c | 9 --
source3/torture/cmd_vfs.c | 19 +++-
30 files changed, 153 insertions(+), 623 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 1f20753fc76..3fcbd321564 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -925,15 +925,6 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
return -1;
}
-static ssize_t skel_listxattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- errno = ENOSYS;
- return -1;
-}
-
static ssize_t skel_flistxattr(vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)
@@ -1139,7 +1130,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.getxattrat_send_fn = skel_getxattrat_send,
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
- .listxattr_fn = skel_listxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f7d99e6101b..87eec7544d1 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -1219,14 +1219,6 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
return SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
}
-static ssize_t skel_listxattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- return SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-}
-
static ssize_t skel_flistxattr(vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)
@@ -1444,7 +1436,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.getxattrat_send_fn = skel_getxattrat_send,
.getxattrat_recv_fn = skel_getxattrat_recv,
.fgetxattr_fn = skel_fgetxattr,
- .listxattr_fn = skel_listxattr,
.flistxattr_fn = skel_flistxattr,
.removexattr_fn = skel_removexattr,
.fremovexattr_fn = skel_fremovexattr,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index eb005bdc86a..db2283b7cd0 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -342,9 +342,11 @@
* Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION()
* Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD()
* Version 44 - Remove SMB_VFS_SYS_ACL_SET_FILE()
+ * Change to Version 45 - will ship with 4.15
+ * Version 45 - Remove SMB_VFS_LISTXATTR
*/
-#define SMB_VFS_INTERFACE_VERSION 44
+#define SMB_VFS_INTERFACE_VERSION 45
/*
All intercepted VFS operations must be declared as static functions inside module source
@@ -1244,10 +1246,6 @@ struct vfs_fn_pointers {
TALLOC_CTX *mem_ctx,
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 (*listxattr_fn)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- 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,
@@ -1769,10 +1767,6 @@ ssize_t smb_vfs_call_getxattrat_recv(struct tevent_req *req,
ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, const char *name,
void *value, size_t size);
-ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size);
ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 9a6dd67288c..d006aaf60bd 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -546,11 +546,6 @@
#define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
smb_vfs_call_fgetxattr((handle)->next,(fsp),(name),(value),(size))
-#define SMB_VFS_LISTXATTR(conn,smb_fname,list,size) \
- smb_vfs_call_listxattr((conn)->vfs_handles,(smb_fname),(list),(size))
-#define SMB_VFS_NEXT_LISTXATTR(handle,smb_fname,list,size) \
- smb_vfs_call_listxattr((handle)->next,(smb_fname),(list),(size))
-
#define SMB_VFS_FLISTXATTR(fsp,list,size) \
smb_vfs_call_flistxattr((fsp)->conn->vfs_handles, (fsp), (list),(size))
#define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
diff --git a/source3/modules/The_New_VFS.org b/source3/modules/The_New_VFS.org
index 1b7a36c63d5..4533509d9cd 100644
--- a/source3/modules/The_New_VFS.org
+++ b/source3/modules/The_New_VFS.org
@@ -254,7 +254,7 @@ whenever VFS access is done in a piecemeal fashion.
| SMB_VFS_LCHOWN() | [[Path][Path]] | Todo |
| SMB_VFS_LINKAT() | [[NsC][NsC]] | - |
| SMB_VFS_LINUX_SETLEASE() | [[fsp][fsp]] | - |
-| SMB_VFS_LISTXATTR() | [[Path][Path]] | Todo |
+| SMB_VFS_LISTXATTR() | [[Path][Path]] | - |
| SMB_VFS_LOCK() | [[fsp][fsp]] | - |
| SMB_VFS_LSEEK() | [[fsp][fsp]] | - |
| SMB_VFS_LSTAT() | [[Path][Path]] | Todo |
diff --git a/source3/modules/The_New_VFS.txt b/source3/modules/The_New_VFS.txt
index 59df7a97a8e..0a9f60b84f8 100644
--- a/source3/modules/The_New_VFS.txt
+++ b/source3/modules/The_New_VFS.txt
@@ -322,7 +322,7 @@ Table of Contents
SMB_VFS_LCHOWN() [Path] Todo
SMB_VFS_LINKAT() [NsC] -
SMB_VFS_LINUX_SETLEASE() [fsp] -
- SMB_VFS_LISTXATTR() [Path] Todo
+ SMB_VFS_LISTXATTR() [Path] -
SMB_VFS_LOCK() [fsp] -
SMB_VFS_LSEEK() [fsp] -
SMB_VFS_LSTAT() [Path] Todo
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 95b6087d41c..5c2474e66e7 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -910,43 +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 ssize_t cap_listxattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- struct smb_filename *cap_smb_fname = NULL;
- char *cappath = capencode(talloc_tos(), smb_fname->base_name);
- ssize_t ret;
- int saved_errno = 0;
-
- if (!cappath) {
- 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);
- errno = ENOMEM;
- return -1;
- }
- ret = SMB_VFS_NEXT_LISTXATTR(handle, cap_smb_fname, list, size);
- if (ret == -1) {
- saved_errno = errno;
- }
- TALLOC_FREE(cappath);
- TALLOC_FREE(cap_smb_fname);
- if (saved_errno) {
- errno = saved_errno;
- }
- return ret;
-}
-
static int cap_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
const char *name)
@@ -1151,7 +1114,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,
- .listxattr_fn = cap_listxattr,
.removexattr_fn = cap_removexattr,
.fremovexattr_fn = cap_fremovexattr,
.setxattr_fn = cap_setxattr,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index d7e53e4fa12..0a3fa5ca791 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -982,19 +982,21 @@ catia_streaminfo(struct vfs_handle_struct *handle,
&mapped_name,
vfs_translate_to_unix);
if (!NT_STATUS_IS_OK(status)) {
- errno = map_errno_from_nt_status(status);
return status;
}
- catia_smb_fname = synthetic_smb_fname(talloc_tos(),
+ status = synthetic_pathref(talloc_tos(),
+ handle->conn->cwd_fsp,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->twrp,
- smb_fname->flags);
- if (catia_smb_fname == NULL) {
+ smb_fname->flags,
+ &catia_smb_fname);
+
+ if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(mapped_name);
- return NT_STATUS_NO_MEMORY;
+ return status;
}
status = SMB_VFS_NEXT_STREAMINFO(handle, fsp, catia_smb_fname,
@@ -1239,51 +1241,6 @@ catia_getxattr(vfs_handle_struct *handle,
return ret;
}
-static ssize_t
-catia_listxattr(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list, size_t size)
-{
- struct smb_filename *mapped_smb_fname = NULL;
- char *mapped_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;
- }
-
- 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);
- errno = ENOMEM;
- return -1;
- }
-
- ret = SMB_VFS_NEXT_LISTXATTR(handle, mapped_smb_fname, list, size);
- if (ret == -1) {
- saved_errno = errno;
- }
- TALLOC_FREE(mapped_name);
- TALLOC_FREE(mapped_smb_fname);
- if (saved_errno != 0) {
- errno = saved_errno;
- }
-
- return ret;
-}
-
static int
catia_removexattr(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
@@ -2424,7 +2381,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,
- .listxattr_fn = catia_listxattr,
.removexattr_fn = catia_removexattr,
.setxattr_fn = catia_setxattr,
.fgetxattr_fn = catia_fgetxattr,
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 47b5046cfcb..d37e749455a 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1278,22 +1278,6 @@ static ssize_t cephwrap_fgetxattr(struct vfs_handle_struct *handle, struct files
return (ssize_t)ret;
}
-static ssize_t cephwrap_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- int ret;
- DBG_DEBUG("[CEPH] listxattr(%p, %s, %p, %llu)\n", handle,
- smb_fname->base_name, list, llu(size));
- ret = ceph_listxattr(handle->data, smb_fname->base_name, list, size);
- DBG_DEBUG("[CEPH] listxattr(...) = %d\n", ret);
- if (ret < 0) {
- WRAP_RETURN(ret);
- }
- return (ssize_t)ret;
-}
-
static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
int ret;
@@ -1595,7 +1579,6 @@ static struct vfs_fn_pointers ceph_fns = {
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = cephwrap_fgetxattr,
- .listxattr_fn = cephwrap_listxattr,
.flistxattr_fn = cephwrap_flistxattr,
.removexattr_fn = cephwrap_removexattr,
.fremovexattr_fn = cephwrap_fremovexattr,
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index 1c395e2a020..9d93b8ba9da 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -1298,47 +1298,6 @@ static ssize_t ceph_snap_gmt_getxattr(vfs_handle_struct *handle,
return ret;
}
-static ssize_t ceph_snap_gmt_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *csmb_fname,
- char *list, size_t size)
-{
- time_t timestamp = 0;
- char stripped[PATH_MAX + 1];
- char conv[PATH_MAX + 1];
- int ret;
- struct smb_filename *new_fname;
- int saved_errno;
-
- ret = ceph_snap_gmt_strip_snapshot(handle,
- csmb_fname,
- ×tamp, stripped, sizeof(stripped));
- if (ret < 0) {
- errno = -ret;
- return -1;
- }
- if (timestamp == 0) {
- return SMB_VFS_NEXT_LISTXATTR(handle, csmb_fname, list, size);
- }
- ret = ceph_snap_gmt_convert(handle, stripped,
- timestamp, conv, sizeof(conv));
- if (ret < 0) {
- errno = -ret;
- return -1;
- }
- new_fname = cp_smb_filename(talloc_tos(), csmb_fname);
- if (new_fname == NULL) {
- errno = ENOMEM;
- return -1;
- }
- new_fname->base_name = conv;
-
- ret = SMB_VFS_NEXT_LISTXATTR(handle, new_fname, list, size);
- saved_errno = errno;
- TALLOC_FREE(new_fname);
- errno = saved_errno;
- return ret;
-}
-
static int ceph_snap_gmt_removexattr(vfs_handle_struct *handle,
const struct smb_filename *csmb_fname,
const char *aname)
@@ -1531,7 +1490,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,
- .listxattr_fn = ceph_snap_gmt_listxattr,
.removexattr_fn = ceph_snap_gmt_removexattr,
.setxattr_fn = ceph_snap_gmt_setxattr,
.chflags_fn = ceph_snap_gmt_chflags,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 84464bc3b04..7291813f609 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -3612,14 +3612,6 @@ static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle,
return getxattr(fsp->fsp_name->base_name, name, value, size);
}
-static ssize_t vfswrap_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- return listxattr(smb_fname->base_name, list, size);
-}
-
static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
{
int fd = fsp_get_pathref_fd(fsp);
@@ -3896,7 +3888,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.getxattrat_send_fn = vfswrap_getxattrat_send,
.getxattrat_recv_fn = vfswrap_getxattrat_recv,
.fgetxattr_fn = vfswrap_fgetxattr,
- .listxattr_fn = vfswrap_listxattr,
.flistxattr_fn = vfswrap_flistxattr,
.removexattr_fn = vfswrap_removexattr,
.fremovexattr_fn = vfswrap_fremovexattr,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index cfb9ba4fcef..eb7f836a84e 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -209,7 +209,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_GETXATTRAT_SEND,
SMB_VFS_OP_GETXATTRAT_RECV,
SMB_VFS_OP_FGETXATTR,
- SMB_VFS_OP_LISTXATTR,
SMB_VFS_OP_FLISTXATTR,
SMB_VFS_OP_REMOVEXATTR,
SMB_VFS_OP_FREMOVEXATTR,
@@ -341,7 +340,6 @@ static struct {
{ SMB_VFS_OP_GETXATTRAT_SEND, "getxattrat_send" },
{ SMB_VFS_OP_GETXATTRAT_RECV, "getxattrat_recv" },
{ SMB_VFS_OP_FGETXATTR, "fgetxattr" },
- { SMB_VFS_OP_LISTXATTR, "listxattr" },
{ SMB_VFS_OP_FLISTXATTR, "flistxattr" },
{ SMB_VFS_OP_REMOVEXATTR, "removexattr" },
{ SMB_VFS_OP_FREMOVEXATTR, "fremovexattr" },
@@ -2819,24 +2817,6 @@ static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
return result;
}
-static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- ssize_t result;
-
- result = SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-
- do_log(SMB_VFS_OP_LISTXATTR,
- (result >= 0),
- handle,
- "%s",
- smb_fname_str_do_log(handle->conn, smb_fname));
-
- return result;
-}
-
static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
struct files_struct *fsp, char *list,
size_t size)
@@ -3095,7 +3075,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.getxattrat_send_fn = smb_full_audit_getxattrat_send,
.getxattrat_recv_fn = smb_full_audit_getxattrat_recv,
.fgetxattr_fn = smb_full_audit_fgetxattr,
- .listxattr_fn = smb_full_audit_listxattr,
.flistxattr_fn = smb_full_audit_flistxattr,
.removexattr_fn = smb_full_audit_removexattr,
.fremovexattr_fn = smb_full_audit_fremovexattr,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index af0ce70e1e8..8cfc8f80fa9 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -2040,14 +2040,6 @@ static ssize_t vfs_gluster_fgetxattr(struct vfs_handle_struct *handle,
return glfs_fgetxattr(glfd, name, value, size);
}
-static ssize_t vfs_gluster_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
- size_t size)
-{
- return glfs_listxattr(handle->data, smb_fname->base_name, list, size);
-}
-
static ssize_t vfs_gluster_flistxattr(struct vfs_handle_struct *handle,
files_struct *fsp, char *list,
size_t size)
@@ -2357,7 +2349,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = vfs_gluster_fgetxattr,
- .listxattr_fn = vfs_gluster_listxattr,
.flistxattr_fn = vfs_gluster_flistxattr,
.removexattr_fn = vfs_gluster_removexattr,
.fremovexattr_fn = vfs_gluster_fremovexattr,
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 1df23169472..4c1e9aa6576 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -2129,41 +2129,6 @@ out:
return ret;
}
-/*
- * Success: return positive number
- * Failure: set errno, return -1
- */
-static ssize_t mh_listxattr(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- char *list,
--
Samba Shared Repository
More information about the samba-cvs
mailing list