The branch, v4-5-test has been updated via 4387d85 Revert "vfs_fruit: fix fruit:resource option spelling, but not behaviour" from 415864f script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt creation
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test - Log ----------------------------------------------------------------- commit 4387d85db3c9e4508b49ebe61534c696b93638b5 Author: Karolin Seeger <ksee...@samba.org> Date: Fri Jan 27 05:37:20 2017 +0100 Revert "vfs_fruit: fix fruit:resource option spelling, but not behaviour" This reverts commit 586f8b73b6c189cb825ce2e8817230ca57f87d35. This patchset slipped in by accident and is not in master yet. The commit message does not fit to the set of patches, because numerous patches have been squashed into one commit. It's a rewrite of vfs_fruit. Reverting until review will be finished and patches are in master. Autobuild-User(v4-5-test): Karolin Seeger <ksee...@samba.org> Autobuild-Date(v4-5-test): Fri Jan 27 09:48:52 CET 2017 on sn-devel-144 ----------------------------------------------------------------------- Summary of changes: docs-xml/manpages/vfs_fruit.8.xml | 8 +- lib/torture/torture.h | 10 - selftest/target/Samba3.pm | 26 +- selftest/target/Samba4.pm | 2 +- source3/include/MacExtensions.h | 3 - source3/modules/vfs_catia.c | 1052 ----------- source3/modules/vfs_fruit.c | 3351 ++++++++++------------------------- source3/modules/vfs_streams_xattr.c | 6 +- source3/selftest/tests.py | 7 +- source4/torture/vfs/fruit.c | 398 +---- source4/torture/vfs/vfs.c | 37 +- 11 files changed, 977 insertions(+), 3923 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml index c31aa75..a0b3893 100644 --- a/docs-xml/manpages/vfs_fruit.8.xml +++ b/docs-xml/manpages/vfs_fruit.8.xml @@ -168,13 +168,9 @@ <para>Controls how the set of illegal NTFS ASCII character, commonly used by OS X clients, are stored in - the filesystem.</para> + the filesystem:</para> - <para><emphasis>Important:</emphasis> this is known to not fully - work with <emphasis>fruit:metadata=stream</emphasis> or - <emphasis>fruit:resource=stream</emphasis>.</para> - - <itemizedlist> + <itemizedlist> <listitem><para><command>private (default)</command> - store characters as encoded by the OS X client: mapped diff --git a/lib/torture/torture.h b/lib/torture/torture.h index f889211..45332b2 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -357,16 +357,6 @@ void torture_result(struct torture_context *test, } \ } while(0) -#define torture_assert_mem_equal_goto(torture_ctx,got,expected,len,ret,label,cmt) \ - do { const void *__got = (got), *__expected = (expected); \ - if (memcmp(__got, __expected, len) != 0) { \ - torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" of len %d did not match "#expected": %s", (int)len, cmt); \ - return false; \ - goto label; \ - } \ - } while(0) - static inline void torture_dump_data_str_cb(const char *buf, void *private_data) { char **dump = (char **)private_data; diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 9a06733..8f2a1f5 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1610,35 +1610,11 @@ sub provision($$$$$$$$) path = $shrdir vfs objects = catia fruit streams_xattr acl_xattr ea support = yes - fruit:resource = file + fruit:ressource = file fruit:metadata = netatalk fruit:locking = netatalk fruit:encoding = native -[vfs_fruit_metadata_stream] - path = $shrdir - vfs objects = fruit streams_xattr acl_xattr - ea support = yes - fruit:resource = file - fruit:metadata = stream - -[vfs_fruit_stream_depot] - path = $shrdir - vfs objects = fruit streams_depot acl_xattr - ea support = yes - fruit:resource = stream - fruit:metadata = stream - -[vfs_wo_fruit] - path = $shrdir - vfs objects = streams_xattr acl_xattr - ea support = yes - -[vfs_wo_fruit_stream_depot] - path = $shrdir - vfs objects = streams_depot acl_xattr - ea support = yes - [badname-tmp] path = $badnames_shrdir guest ok = yes diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index ffa104f..f1de4b9 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -910,7 +910,7 @@ sub provision($$$$$$$$$$) path = $ctx->{share} vfs objects = catia fruit streams_xattr acl_xattr ea support = yes - fruit:resource = file + fruit:ressource = file fruit:metadata = netatalk fruit:locking = netatalk fruit:encoding = native diff --git a/source3/include/MacExtensions.h b/source3/include/MacExtensions.h index e17d39b..23dcde9 100644 --- a/source3/include/MacExtensions.h +++ b/source3/include/MacExtensions.h @@ -51,9 +51,6 @@ #define AFP_Version 0x00000100 #define AFP_BackupTime 0x80000000 #define AFP_FinderSize 32 - -#define AFP_OFF_FinderInfo 16 - /* ** Orginal AFP_AfpInfo stream used by NT ** We needed a way to store the create date so SAMBA diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 56d6447..f4c77d9 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -1114,1036 +1114,6 @@ catia_setxattr(vfs_handle_struct *handle, const char *path, return ret; } -static int catia_fstat(vfs_handle_struct *handle, - files_struct *fsp, - SMB_STRUCT_STAT *sbuf) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return ret; -} - -static ssize_t catia_pread(vfs_handle_struct *handle, - files_struct *fsp, void *data, - size_t n, off_t offset) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return ret; -} - -static ssize_t catia_pwrite(vfs_handle_struct *handle, - files_struct *fsp, const void *data, - size_t n, off_t offset) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return ret; -} - -static int catia_ftruncate(struct vfs_handle_struct *handle, - struct files_struct *fsp, - off_t offset) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return ret; -} - -static int catia_fallocate(struct vfs_handle_struct *handle, - struct files_struct *fsp, - uint32_t mode, - off_t offset, - off_t len) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_FALLOCATE(handle, fsp, mode, offset, len); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return ret; -} - -static ssize_t catia_fgetxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - ssize_t result = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return result; -} - -static ssize_t catia_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - ssize_t result = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - result = SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size); - - fsp->fsp_name->base_name = tmp_fname; - if (fsp->base_fsp != NULL) { - fsp->base_fsp->fsp_name->base_name = tmp_base_fname; - } - -done: - TALLOC_FREE(fname); - TALLOC_FREE(base_fname); - - return result; -} - -static int catia_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name) -{ - char *fname = NULL; - char *tmp_fname = NULL; - char *base_fname = NULL; - char *tmp_base_fname = NULL; - int ret = -1; - NTSTATUS status; - - status = catia_string_replace_allocate(handle->conn, - fsp->fsp_name->base_name, - &fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - if (fsp->base_fsp != NULL) { - status = catia_string_replace_allocate( - handle->conn, - fsp->base_fsp->fsp_name->base_name, - &base_fname, vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - - tmp_base_fname = fsp->base_fsp->fsp_name->base_name; - fsp->base_fsp->fsp_name->base_name = base_fname; - } - - tmp_fname = fsp->fsp_name->base_name; - fsp->fsp_name->base_name = fname; - - ret = SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name); -- Samba Shared Repository