The Samba-Bugzilla – Attachment 14186 Details for
Bug 13175
Accessing ZFS snapshot directories over SMB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master
bug13175-master.patch (text/plain), 2.82 KB, created by
Ralph Böhme
on 2018-05-09 11:53:15 UTC
(
hide
)
Description:
Patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2018-05-09 11:53:15 UTC
Size:
2.82 KB
patch
obsolete
>From dd5d7b88a22ad02fe2f4d48a35570de8f737af4f Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Tue, 5 Dec 2017 08:28:28 +0100 >Subject: [PATCH] vfs_zfsacl: return synthesized ACL when ZFS return ENOTSUP > >This allows accessing the ZFS .snapshots directory where ZFS returns >ENOTSUP when calling acl(".snapshots"). > >This also adds a parametric option "zfsacl:expose_snapdir" that can be >used to turn this behaviour off. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13175 > >Signed-off-by: Ralph Boehme <slow@samba.org> >--- > source3/modules/vfs_zfsacl.c | 50 ++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 48 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c >index 0bc4ba6604f..8089678e040 100644 >--- a/source3/modules/vfs_zfsacl.c >+++ b/source3/modules/vfs_zfsacl.c >@@ -233,12 +233,32 @@ static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle, > struct SMB4ACL_T *pacl; > NTSTATUS status; > TALLOC_CTX *frame = talloc_stackframe(); >+ bool expose; > > status = zfs_get_nt_acl_common(handle->conn, frame, > fsp->fsp_name, &pacl); > if (!NT_STATUS_IS_OK(status)) { > TALLOC_FREE(frame); >- return status; >+ if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { >+ return status; >+ } >+ >+ expose = lp_parm_bool(conn->params->service, >+ "zfsacl", "expose_snapdir", true); >+ if (!expose) { >+ return status; >+ } >+ >+ status = make_default_filesystem_acl(mem_ctx, >+ DEFAULT_ACL_POSIX, >+ fsp->fsp_name->base_name, >+ &fsp->fsp_name->st, >+ ppdesc); >+ if (!NT_STATUS_IS_OK(status)) { >+ return status; >+ } >+ *ppdesc->type |= SEC_DESC_DACL_PROTECTED; >+ return NT_STATUS_OK; > } > > status = smb_fget_nt_acl_nfs4(fsp, NULL, security_info, mem_ctx, >@@ -256,11 +276,37 @@ static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle, > struct SMB4ACL_T *pacl; > NTSTATUS status; > TALLOC_CTX *frame = talloc_stackframe(); >+ bool expose; > > status = zfs_get_nt_acl_common(handle->conn, frame, smb_fname, &pacl); > if (!NT_STATUS_IS_OK(status)) { > TALLOC_FREE(frame); >- return status; >+ if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { >+ return status; >+ } >+ >+ if (!VALID_STAT(smb_fname->st)) { >+ DBG_ERR("No stat info for [%s]\n", >+ smb_fname_str_dbg(smb_fname)); >+ return NT_STATUS_INTERNAL_ERROR; >+ } >+ >+ expose = lp_parm_bool(conn->params->service, >+ "zfsacl", "expose_snapdir", true); >+ if (!expose) { >+ return status; >+ } >+ >+ status = make_default_filesystem_acl(mem_ctx, >+ DEFAULT_ACL_POSIX, >+ smb_fname->base_name, >+ &smb_fname->st, >+ ppdesc); >+ if (!NT_STATUS_IS_OK(status)) { >+ return status; >+ } >+ *ppdesc->type |= SEC_DESC_DACL_PROTECTED; >+ return NT_STATUS_OK; > } > > status = smb_get_nt_acl_nfs4(handle->conn, >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13175
:
13845
|
14186
|
14204
|
14552