[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri May 18 20:04:03 UTC 2018
The branch, master has been updated
via f93cc23 vfs_zfsacl: return synthesized ACL when ZFS return ENOTSUP
via ec2a408 s3:smbd: make psbuf arg to make_default_acl_posix() const
from a52d0c3 python/samba/netcmd: Py2/Py3 misc replace range with enumerate
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f93cc232377d4c686ac35ee5e14e798974bc0700
Author: Ralph Boehme <slow at samba.org>
Date: Tue Dec 5 08:28:28 2017 +0100
vfs_zfsacl: return synthesized ACL when ZFS return ENOTSUP
This allows accessing the ZFS .snapshots directory where ZFS returns
ENOTSUP when calling acl(".snapshots").
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13175
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri May 18 22:03:21 CEST 2018 on sn-devel-144
commit ec2a40831359ae93f437ef76f8ba76bbd95bc6dc
Author: Ralph Boehme <slow at samba.org>
Date: Fri May 18 13:14:57 2018 +0200
s3:smbd: make psbuf arg to make_default_acl_posix() const
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13175
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_zfsacl.c | 36 ++++++++++++++++++++++++++++++++++--
source3/smbd/posix_acls.c | 8 ++++----
source3/smbd/proto.h | 2 +-
3 files changed, 39 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index 0bc4ba6..43e41f9 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -238,7 +238,20 @@ static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
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;
+ }
+
+ 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,
@@ -260,7 +273,26 @@ static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle,
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;
+ }
+
+ 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,
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 8d42535..6396f81 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4779,7 +4779,7 @@ int posix_sys_acl_blob_get_fd(vfs_handle_struct *handle,
static NTSTATUS make_default_acl_posix(TALLOC_CTX *ctx,
const char *name,
- SMB_STRUCT_STAT *psbuf,
+ const SMB_STRUCT_STAT *psbuf,
struct security_descriptor **ppdesc)
{
struct dom_sid owner_sid, group_sid;
@@ -4886,7 +4886,7 @@ static NTSTATUS make_default_acl_posix(TALLOC_CTX *ctx,
static NTSTATUS make_default_acl_windows(TALLOC_CTX *ctx,
const char *name,
- SMB_STRUCT_STAT *psbuf,
+ const SMB_STRUCT_STAT *psbuf,
struct security_descriptor **ppdesc)
{
struct dom_sid owner_sid, group_sid;
@@ -4958,7 +4958,7 @@ static NTSTATUS make_default_acl_windows(TALLOC_CTX *ctx,
static NTSTATUS make_default_acl_everyone(TALLOC_CTX *ctx,
const char *name,
- SMB_STRUCT_STAT *psbuf,
+ const SMB_STRUCT_STAT *psbuf,
struct security_descriptor **ppdesc)
{
struct dom_sid owner_sid, group_sid;
@@ -5022,7 +5022,7 @@ NTSTATUS make_default_filesystem_acl(
TALLOC_CTX *ctx,
enum default_acl_style acl_style,
const char *name,
- SMB_STRUCT_STAT *psbuf,
+ const SMB_STRUCT_STAT *psbuf,
struct security_descriptor **ppdesc)
{
NTSTATUS status;
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index bee7aca..262338d 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -819,7 +819,7 @@ NTSTATUS make_default_filesystem_acl(
TALLOC_CTX *ctx,
enum default_acl_style acl_style,
const char *name,
- SMB_STRUCT_STAT *psbuf,
+ const SMB_STRUCT_STAT *psbuf,
struct security_descriptor **ppdesc);
/* The following definitions come from smbd/process.c */
--
Samba Shared Repository
More information about the samba-cvs
mailing list