[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Tue Sep 12 08:51:02 UTC 2017
The branch, master has been updated
via 3ff1b83 s3: vfs: catia: compression get/set must act only on base file, and must cope with fsp==NULL.
via 1a7c0f7 s3: VFS: streams_xattr: Compression is only set/get on base filenames.
from 54e6f15 packaging: Remove Solaris directory and contents
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3ff1b83ab7cb3a6ab94b87d0bf73857b731c869d
Author: Jeremy Allison <jra at samba.org>
Date: Fri Sep 8 15:28:39 2017 -0700
s3: vfs: catia: compression get/set must act only on base file, and must cope with fsp==NULL.
Correctly do filename conversion.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13003
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): Tue Sep 12 10:50:57 CEST 2017 on sn-devel-144
commit 1a7c0f77e2203aa674eb8b06fe3220868f100001
Author: Jeremy Allison <jra at samba.org>
Date: Fri Sep 8 15:27:37 2017 -0700
s3: VFS: streams_xattr: Compression is only set/get on base filenames.
Can be ignored (pass-through) in streams_xattr VFS module.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13003
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_catia.c | 44 ++++++++++++++++++++++++++++++++-----
source3/modules/vfs_streams_xattr.c | 37 -------------------------------
2 files changed, 38 insertions(+), 43 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 5cf7476..c47b64d 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -2435,16 +2435,48 @@ static NTSTATUS catia_get_compression(vfs_handle_struct *handle,
NTSTATUS result;
struct catia_cache *cc = NULL;
int ret;
+ struct smb_filename *mapped_smb_fname = NULL;
+ char *mapped_name = NULL;
- ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
- if (ret != 0) {
- return map_nt_error_from_unix(errno);
+ if (fsp != NULL) {
+ ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
+ if (ret != 0) {
+ return map_nt_error_from_unix(errno);
+ }
+ mapped_smb_fname = fsp->fsp_name;
+ } else {
+ result = catia_string_replace_allocate(handle->conn,
+ smb_fname->base_name,
+ &mapped_name,
+ vfs_translate_to_unix);
+ if (!NT_STATUS_IS_OK(result)) {
+ return result;
+ }
+
+ mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
+ mapped_name,
+ NULL,
+ NULL,
+ smb_fname->flags);
+ if (mapped_smb_fname == NULL) {
+ TALLOC_FREE(mapped_name);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ TALLOC_FREE(mapped_name);
}
- result = SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp, smb_fname,
- _compression_fmt);
+ result = SMB_VFS_NEXT_GET_COMPRESSION(handle,
+ mem_ctx,
+ fsp,
+ mapped_smb_fname,
+ _compression_fmt);
- CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
+ if (fsp != NULL) {
+ CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
+ } else {
+ TALLOC_FREE(mapped_smb_fname);
+ }
return result;
}
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index bd3965c..1b0b577 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -1653,40 +1653,6 @@ static bool streams_xattr_strict_lock_check(struct vfs_handle_struct *handle,
return true;
}
-static NTSTATUS streams_xattr_get_compression(struct vfs_handle_struct *handle,
- TALLOC_CTX *mem_ctx,
- struct files_struct *fsp,
- struct smb_filename *smb_fname,
- uint16_t *_compression_fmt)
-{
- struct stream_io *sio =
- (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
-
- if (sio == NULL) {
- return SMB_VFS_NEXT_GET_COMPRESSION(handle, mem_ctx, fsp,
- smb_fname, _compression_fmt);
- }
-
- *_compression_fmt = COMPRESSION_FORMAT_NONE;
- return NT_STATUS_OK;
-}
-
-static NTSTATUS streams_xattr_set_compression(struct vfs_handle_struct *handle,
- TALLOC_CTX *mem_ctx,
- struct files_struct *fsp,
- uint16_t compression_fmt)
-{
- struct stream_io *sio =
- (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
-
- if (sio == NULL) {
- return SMB_VFS_NEXT_SET_COMPRESSION(handle, mem_ctx, fsp,
- compression_fmt);
- }
-
- return NT_STATUS_NOT_SUPPORTED;
-}
-
static struct vfs_fn_pointers vfs_streams_xattr_fns = {
.fs_capabilities_fn = streams_xattr_fs_capabilities,
.connect_fn = streams_xattr_connect,
@@ -1715,9 +1681,6 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
.linux_setlease_fn = streams_xattr_linux_setlease,
.strict_lock_check_fn = streams_xattr_strict_lock_check,
- .get_compression_fn = streams_xattr_get_compression,
- .set_compression_fn = streams_xattr_set_compression,
-
.fchown_fn = streams_xattr_fchown,
.fchmod_fn = streams_xattr_fchmod,
.fsync_fn = streams_xattr_fsync,
--
Samba Shared Repository
More information about the samba-cvs
mailing list