From e202c7b6edfe23d6c02ce1f449f9b6143d6477a2 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 26 Oct 2023 14:37:15 -0700 Subject: [PATCH 01/16] vfs_gpfs: Use O_PATH for opening dirfd for stat with CAP_DAC_OVERRIDE Use O_PATH when available; this avoids the need for READ/LIST access on that directory. Keep using O_RDONLY if the system does not have O_PATH. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme (cherry picked from commit b317622a8fed0ee195ffe40129eb5bcad28dd985) --- source3/modules/vfs_gpfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 3398879c900..b179eba8880 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1603,6 +1603,11 @@ static int stat_with_capability(struct vfs_handle_struct *handle, struct smb_filename *dir_name = NULL; struct smb_filename *rel_name = NULL; int ret = -1; +#ifdef O_PATH + int open_flags = O_PATH; +#else + int open_flags = O_RDONLY; +#endif status = SMB_VFS_PARENT_PATHNAME(handle->conn, talloc_tos(), @@ -1614,7 +1619,7 @@ static int stat_with_capability(struct vfs_handle_struct *handle, return -1; } - fd = open(dir_name->base_name, O_RDONLY, 0); + fd = open(dir_name->base_name, open_flags, 0); if (fd == -1) { TALLOC_FREE(dir_name); return -1; -- 2.39.3 From cfbdf6936e5721fce71128e97907e8936a2f326c Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 26 Oct 2023 14:39:46 -0700 Subject: [PATCH 02/16] vfs_gpfs: Move fstatat with DAC_CAP_OVERRIDE to helper function Allow reuse of this code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme (cherry picked from commit 95319351e37b8b968b798eee66c93852d9ad2d81) --- source3/modules/vfs_gpfs.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b179eba8880..6c3c217b5dd 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,6 +1594,25 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } +static int fstatat_with_cap_dac_override(int fd, + const char *pathname, + SMB_STRUCT_STAT *sbuf, + int flags, + bool fake_dir_create_times) +{ + int ret; + + set_effective_capability(DAC_OVERRIDE_CAPABILITY); + ret = sys_fstatat(fd, + pathname, + sbuf, + flags, + fake_dir_create_times); + drop_effective_capability(DAC_OVERRIDE_CAPABILITY); + + return ret; +} + static int stat_with_capability(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, int flag) { @@ -1625,14 +1644,11 @@ static int stat_with_capability(struct vfs_handle_struct *handle, return -1; } - set_effective_capability(DAC_OVERRIDE_CAPABILITY); - ret = sys_fstatat(fd, - rel_name->base_name, - &smb_fname->st, - flag, - fake_dctime); - - drop_effective_capability(DAC_OVERRIDE_CAPABILITY); + ret = fstatat_with_cap_dac_override(fd, + rel_name->base_name, + &smb_fname->st, + flag, + fake_dctime); TALLOC_FREE(dir_name); close(fd); -- 2.39.3 From e12ac92fac50de77b2969121302c18a7e7faad94 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 26 Oct 2023 14:45:34 -0700 Subject: [PATCH 03/16] vfs_gpfs: Implement CAP_DAC_OVERRIDE for fstat BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme (cherry picked from commit cbdc16a7cfa225d1cf9109fafe85e9d14729700e) --- source3/modules/vfs_gpfs.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 6c3c217b5dd..1e708454f6d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1670,6 +1670,29 @@ static int vfs_gpfs_stat(struct vfs_handle_struct *handle, return ret; } +static int vfs_gpfs_fstat(struct vfs_handle_struct *handle, + struct files_struct *fsp, + SMB_STRUCT_STAT *sbuf) +{ + int ret; + + ret = SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf); + if (ret == -1 && errno == EACCES) { + bool fake_dctime = + lp_fake_directory_create_times(SNUM(handle->conn)); + + DBG_DEBUG("fstat for %s failed with EACCES. Trying with " + "CAP_DAC_OVERRIDE.\n", fsp->fsp_name->base_name); + ret = fstatat_with_cap_dac_override(fsp_get_pathref_fd(fsp), + "", + sbuf, + AT_EMPTY_PATH, + fake_dctime); + } + + return ret; +} + static int vfs_gpfs_lstat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { @@ -2625,6 +2648,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .fchmod_fn = vfs_gpfs_fchmod, .close_fn = vfs_gpfs_close, .stat_fn = vfs_gpfs_stat, + .fstat_fn = vfs_gpfs_fstat, .lstat_fn = vfs_gpfs_lstat, .fntimes_fn = vfs_gpfs_fntimes, .aio_force_fn = vfs_gpfs_aio_force, -- 2.39.3 From a885df92bdc6883b59aa935d41ce4c81b18e1ae9 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 26 Oct 2023 15:51:02 -0700 Subject: [PATCH 04/16] vfs_gpfs: Implement CAP_DAC_OVERRIDE for fstatat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Wed Nov 8 18:42:13 UTC 2023 on atb-devel-224 (cherry picked from commit 963fc353e70b940f4009ca2764e966682400e2dc) --- source3/modules/vfs_gpfs.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 1e708454f6d..f15b7403236 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1708,6 +1708,31 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle, return ret; } +static int vfs_gpfs_fstatat(struct vfs_handle_struct *handle, + const struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + SMB_STRUCT_STAT *sbuf, + int flags) +{ + int ret; + + ret = SMB_VFS_NEXT_FSTATAT(handle, dirfsp, smb_fname, sbuf, flags); + if (ret == -1 && errno == EACCES) { + bool fake_dctime = + lp_fake_directory_create_times(SNUM(handle->conn)); + + DBG_DEBUG("fstatat for %s failed with EACCES. Trying with " + "CAP_DAC_OVERRIDE.\n", dirfsp->fsp_name->base_name); + ret = fstatat_with_cap_dac_override(fsp_get_pathref_fd(dirfsp), + smb_fname->base_name, + sbuf, + flags, + fake_dctime); + } + + return ret; +} + static int timespec_to_gpfs_time( struct timespec ts, gpfs_timestruc_t *gt, int idx, int *flags) { @@ -2650,6 +2675,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .stat_fn = vfs_gpfs_stat, .fstat_fn = vfs_gpfs_fstat, .lstat_fn = vfs_gpfs_lstat, + .fstatat_fn = vfs_gpfs_fstatat, .fntimes_fn = vfs_gpfs_fntimes, .aio_force_fn = vfs_gpfs_aio_force, .sendfile_fn = vfs_gpfs_sendfile, -- 2.39.3 From 8d323a325b1880765fa8ce608d766b01e5404300 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:01:56 -0700 Subject: [PATCH 05/16] nfs4_acls: Implement fstat with DAC_CAP_OVERRIDE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AT_EMTPY_PATH does not exist on AIX. Address this by implementing an override for fstat. Implement the new override function in nfs4_acls.c since all stat functions with DAC_CAP_OVERRIDE will be moved there to allow reuse by other filesystems. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 05f1ee1ae2d8439af0ac9baf64ebba1a3374ea83) --- source3/modules/nfs4_acls.c | 12 ++++++++++++ source3/modules/nfs4_acls.h | 3 +++ source3/modules/vfs_gpfs.c | 8 +++----- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 2daae990042..1107d628e9e 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -116,6 +116,18 @@ int smbacl4_get_vfs_params(struct connection_struct *conn, return 0; } +int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, + bool fake_dir_create_times) +{ + int ret; + + set_effective_capability(DAC_OVERRIDE_CAPABILITY); + ret = sys_fstat(fd, sbuf, fake_dir_create_times); + drop_effective_capability(DAC_OVERRIDE_CAPABILITY); + + return ret; +} + /************************************************ Split the ACE flag mapping between nfs4 and Windows into two separate functions rather than trying to do diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index c9fcf6d250b..096688b0dff 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -118,6 +118,9 @@ struct smbacl4_vfs_params { int smbacl4_get_vfs_params(struct connection_struct *conn, struct smbacl4_vfs_params *params); +int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, + bool fake_dir_create_times); + struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx); /* prop's contents are copied */ diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index f15b7403236..058f93af285 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1683,11 +1683,9 @@ static int vfs_gpfs_fstat(struct vfs_handle_struct *handle, DBG_DEBUG("fstat for %s failed with EACCES. Trying with " "CAP_DAC_OVERRIDE.\n", fsp->fsp_name->base_name); - ret = fstatat_with_cap_dac_override(fsp_get_pathref_fd(fsp), - "", - sbuf, - AT_EMPTY_PATH, - fake_dctime); + ret = fstat_with_cap_dac_override(fsp_get_pathref_fd(fsp), + sbuf, + fake_dctime); } return ret; -- 2.39.3 From 991c6184b59289facceec6789f9fe6854168d88e Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:17:21 -0700 Subject: [PATCH 06/16] vfs_gpfs: Move fstatat_with_cap_dac_override to nfs4_acls.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat DAC_CAP_OVERRIDE code is being moved to nfs4_acls.c to allow reuse by other filesystem modules. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 316c96ea83a7b70d35879e4743193bb1e9cb566c) --- source3/modules/nfs4_acls.c | 19 +++++++++++++++++++ source3/modules/nfs4_acls.h | 6 ++++++ source3/modules/vfs_gpfs.c | 19 ------------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 1107d628e9e..418c34b4a83 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -116,6 +116,25 @@ int smbacl4_get_vfs_params(struct connection_struct *conn, return 0; } +int fstatat_with_cap_dac_override(int fd, + const char *pathname, + SMB_STRUCT_STAT *sbuf, + int flags, + bool fake_dir_create_times) +{ + int ret; + + set_effective_capability(DAC_OVERRIDE_CAPABILITY); + ret = sys_fstatat(fd, + pathname, + sbuf, + flags, + fake_dir_create_times); + drop_effective_capability(DAC_OVERRIDE_CAPABILITY); + + return ret; +} + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 096688b0dff..edb767f1ce8 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -118,6 +118,12 @@ struct smbacl4_vfs_params { int smbacl4_get_vfs_params(struct connection_struct *conn, struct smbacl4_vfs_params *params); +int fstatat_with_cap_dac_override(int fd, + const char *pathname, + SMB_STRUCT_STAT *sbuf, + int flags, + bool fake_dir_create_times); + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 058f93af285..785c169f21c 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,25 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int fstatat_with_cap_dac_override(int fd, - const char *pathname, - SMB_STRUCT_STAT *sbuf, - int flags, - bool fake_dir_create_times) -{ - int ret; - - set_effective_capability(DAC_OVERRIDE_CAPABILITY); - ret = sys_fstatat(fd, - pathname, - sbuf, - flags, - fake_dir_create_times); - drop_effective_capability(DAC_OVERRIDE_CAPABILITY); - - return ret; -} - static int stat_with_capability(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, int flag) { -- 2.39.3 From 2ceb60aff8738f430b4167814962dccb4b4ccad7 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:20:38 -0700 Subject: [PATCH 07/16] vfs_gpfs: Move stat_with_capability to nfs4_acls.c and rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat CAP_DAC_OVERRIDE code is moving to nfs4_acls.c to allow reuse by other filesystem modules. Also rename the function to the slightly more precise name stat_with_cap_dac_overide. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 6b1e066c4f354f297fbf99ad93acfaf44e3b89cb) --- source3/modules/nfs4_acls.c | 43 ++++++++++++++++++++++++++++++++ source3/modules/nfs4_acls.h | 3 +++ source3/modules/vfs_gpfs.c | 49 +++---------------------------------- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 418c34b4a83..0b29191797b 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -135,6 +135,49 @@ int fstatat_with_cap_dac_override(int fd, return ret; } +int stat_with_cap_dac_override(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname, int flag) +{ + bool fake_dctime = lp_fake_directory_create_times(SNUM(handle->conn)); + int fd = -1; + NTSTATUS status; + struct smb_filename *dir_name = NULL; + struct smb_filename *rel_name = NULL; + int ret = -1; +#ifdef O_PATH + int open_flags = O_PATH; +#else + int open_flags = O_RDONLY; +#endif + + status = SMB_VFS_PARENT_PATHNAME(handle->conn, + talloc_tos(), + smb_fname, + &dir_name, + &rel_name); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); + return -1; + } + + fd = open(dir_name->base_name, open_flags, 0); + if (fd == -1) { + TALLOC_FREE(dir_name); + return -1; + } + + ret = fstatat_with_cap_dac_override(fd, + rel_name->base_name, + &smb_fname->st, + flag, + fake_dctime); + + TALLOC_FREE(dir_name); + close(fd); + + return ret; +} + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index edb767f1ce8..828e1da6c39 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -124,6 +124,9 @@ int fstatat_with_cap_dac_override(int fd, int flags, bool fake_dir_create_times); +int stat_with_cap_dac_override(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname, int flag); + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 785c169f21c..cefe09b75a2 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,49 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int stat_with_capability(struct vfs_handle_struct *handle, - struct smb_filename *smb_fname, int flag) -{ - bool fake_dctime = lp_fake_directory_create_times(SNUM(handle->conn)); - int fd = -1; - NTSTATUS status; - struct smb_filename *dir_name = NULL; - struct smb_filename *rel_name = NULL; - int ret = -1; -#ifdef O_PATH - int open_flags = O_PATH; -#else - int open_flags = O_RDONLY; -#endif - - status = SMB_VFS_PARENT_PATHNAME(handle->conn, - talloc_tos(), - smb_fname, - &dir_name, - &rel_name); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - return -1; - } - - fd = open(dir_name->base_name, open_flags, 0); - if (fd == -1) { - TALLOC_FREE(dir_name); - return -1; - } - - ret = fstatat_with_cap_dac_override(fd, - rel_name->base_name, - &smb_fname->st, - flag, - fake_dctime); - - TALLOC_FREE(dir_name); - close(fd); - - return ret; -} - static int vfs_gpfs_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { @@ -1646,7 +1603,7 @@ static int vfs_gpfs_stat(struct vfs_handle_struct *handle, if (ret == -1 && errno == EACCES) { DEBUG(10, ("Trying stat with capability for %s\n", smb_fname->base_name)); - ret = stat_with_capability(handle, smb_fname, 0); + ret = stat_with_cap_dac_override(handle, smb_fname, 0); } return ret; } @@ -1681,8 +1638,8 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle, if (ret == -1 && errno == EACCES) { DEBUG(10, ("Trying lstat with capability for %s\n", smb_fname->base_name)); - ret = stat_with_capability(handle, smb_fname, - AT_SYMLINK_NOFOLLOW); + ret = stat_with_cap_dac_override(handle, smb_fname, + AT_SYMLINK_NOFOLLOW); } return ret; } -- 2.39.3 From 8d20fa52f3dd7971f26f93db4c3119a7328e2e5d Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:23:49 -0700 Subject: [PATCH 08/16] vfs_gpfs: Move vfs_gpfs_stat to nfs4_acls.c and rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat DAC_CAP_OVERRIDE code is moving to nfs4_acls.c to allow reuse by other file system modules. Also rename the function to the more generic name nfs4_acl_stat. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit f8a23d960e02f783119c2aef38a6e293ee548df3) --- source3/modules/nfs4_acls.c | 14 ++++++++++++++ source3/modules/nfs4_acls.h | 3 +++ source3/modules/vfs_gpfs.c | 16 +--------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 0b29191797b..b643bd8bd7a 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -178,6 +178,20 @@ int stat_with_cap_dac_override(struct vfs_handle_struct *handle, return ret; } +int nfs4_acl_stat(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname) +{ + int ret; + + ret = SMB_VFS_NEXT_STAT(handle, smb_fname); + if (ret == -1 && errno == EACCES) { + DEBUG(10, ("Trying stat with capability for %s\n", + smb_fname->base_name)); + ret = stat_with_cap_dac_override(handle, smb_fname, 0); + } + return ret; +} + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 828e1da6c39..9de97e0f179 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -127,6 +127,9 @@ int fstatat_with_cap_dac_override(int fd, int stat_with_cap_dac_override(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, int flag); +int nfs4_acl_stat(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname); + int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index cefe09b75a2..8478d37e9f4 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,20 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int vfs_gpfs_stat(struct vfs_handle_struct *handle, - struct smb_filename *smb_fname) -{ - int ret; - - ret = SMB_VFS_NEXT_STAT(handle, smb_fname); - if (ret == -1 && errno == EACCES) { - DEBUG(10, ("Trying stat with capability for %s\n", - smb_fname->base_name)); - ret = stat_with_cap_dac_override(handle, smb_fname, 0); - } - return ret; -} - static int vfs_gpfs_fstat(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf) @@ -2608,7 +2594,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .sys_acl_delete_def_fd_fn = gpfsacl_sys_acl_delete_def_fd, .fchmod_fn = vfs_gpfs_fchmod, .close_fn = vfs_gpfs_close, - .stat_fn = vfs_gpfs_stat, + .stat_fn = nfs4_acl_stat, .fstat_fn = vfs_gpfs_fstat, .lstat_fn = vfs_gpfs_lstat, .fstatat_fn = vfs_gpfs_fstatat, -- 2.39.3 From 470188b1d4a63a335f7cce38c60dae885cdbfebe Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:27:58 -0700 Subject: [PATCH 09/16] vfs_gpfs: Move vfs_gpfs_fstat to nfs4_acls.c and rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat DAC_CAP_OVERRIDE code is moving to nfs4_acls.c to allow reuse. Move the vfs_gpfs_fstat function and rename to the more generic name nfs4_acl_fstat. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit f9301871c61b066c1ea464e6e9109bb2cde71598) --- source3/modules/nfs4_acls.c | 21 +++++++++++++++++++++ source3/modules/nfs4_acls.h | 4 ++++ source3/modules/vfs_gpfs.c | 23 +---------------------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index b643bd8bd7a..bf863f3227b 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -204,6 +204,27 @@ int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, return ret; } +int nfs4_acl_fstat(struct vfs_handle_struct *handle, + struct files_struct *fsp, + SMB_STRUCT_STAT *sbuf) +{ + int ret; + + ret = SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf); + if (ret == -1 && errno == EACCES) { + bool fake_dctime = + lp_fake_directory_create_times(SNUM(handle->conn)); + + DBG_DEBUG("fstat for %s failed with EACCES. Trying with " + "CAP_DAC_OVERRIDE.\n", fsp->fsp_name->base_name); + ret = fstat_with_cap_dac_override(fsp_get_pathref_fd(fsp), + sbuf, + fake_dctime); + } + + return ret; +} + /************************************************ Split the ACE flag mapping between nfs4 and Windows into two separate functions rather than trying to do diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 9de97e0f179..d1a585d7932 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -133,6 +133,10 @@ int nfs4_acl_stat(struct vfs_handle_struct *handle, int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times); +int nfs4_acl_fstat(struct vfs_handle_struct *handle, + struct files_struct *fsp, + SMB_STRUCT_STAT *sbuf); + struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx); /* prop's contents are copied */ diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 8478d37e9f4..3594643de95 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,27 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int vfs_gpfs_fstat(struct vfs_handle_struct *handle, - struct files_struct *fsp, - SMB_STRUCT_STAT *sbuf) -{ - int ret; - - ret = SMB_VFS_NEXT_FSTAT(handle, fsp, sbuf); - if (ret == -1 && errno == EACCES) { - bool fake_dctime = - lp_fake_directory_create_times(SNUM(handle->conn)); - - DBG_DEBUG("fstat for %s failed with EACCES. Trying with " - "CAP_DAC_OVERRIDE.\n", fsp->fsp_name->base_name); - ret = fstat_with_cap_dac_override(fsp_get_pathref_fd(fsp), - sbuf, - fake_dctime); - } - - return ret; -} - static int vfs_gpfs_lstat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { @@ -2595,7 +2574,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .fchmod_fn = vfs_gpfs_fchmod, .close_fn = vfs_gpfs_close, .stat_fn = nfs4_acl_stat, - .fstat_fn = vfs_gpfs_fstat, + .fstat_fn = nfs4_acl_fstat, .lstat_fn = vfs_gpfs_lstat, .fstatat_fn = vfs_gpfs_fstatat, .fntimes_fn = vfs_gpfs_fntimes, -- 2.39.3 From 4c79766d020453ab45646a4c883ceb98883306f3 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:30:27 -0700 Subject: [PATCH 10/16] vfs_gpfs: Move vfs_gpfs_lstat to nfs4_acls.c and rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat CAP_DAC_OVERRIDE code is being moved to nf4_acls.c to allow reuse. Move the vfs_gpfs_lstat function and rename to the more generic name nfs4_acl_lstat. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 2c1195678d34516744ba4f8b1c5582f4046cba35) --- source3/modules/nfs4_acls.c | 15 +++++++++++++++ source3/modules/nfs4_acls.h | 3 +++ source3/modules/vfs_gpfs.c | 17 +---------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index bf863f3227b..83a5e034471 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -225,6 +225,21 @@ int nfs4_acl_fstat(struct vfs_handle_struct *handle, return ret; } +int nfs4_acl_lstat(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname) +{ + int ret; + + ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname); + if (ret == -1 && errno == EACCES) { + DEBUG(10, ("Trying lstat with capability for %s\n", + smb_fname->base_name)); + ret = stat_with_cap_dac_override(handle, smb_fname, + AT_SYMLINK_NOFOLLOW); + } + return ret; +} + /************************************************ Split the ACE flag mapping between nfs4 and Windows into two separate functions rather than trying to do diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index d1a585d7932..ee97207387b 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -137,6 +137,9 @@ int nfs4_acl_fstat(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf); +int nfs4_acl_lstat(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname); + struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx); /* prop's contents are copied */ diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 3594643de95..70294635f63 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,21 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int vfs_gpfs_lstat(struct vfs_handle_struct *handle, - struct smb_filename *smb_fname) -{ - int ret; - - ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname); - if (ret == -1 && errno == EACCES) { - DEBUG(10, ("Trying lstat with capability for %s\n", - smb_fname->base_name)); - ret = stat_with_cap_dac_override(handle, smb_fname, - AT_SYMLINK_NOFOLLOW); - } - return ret; -} - static int vfs_gpfs_fstatat(struct vfs_handle_struct *handle, const struct files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -2575,7 +2560,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .close_fn = vfs_gpfs_close, .stat_fn = nfs4_acl_stat, .fstat_fn = nfs4_acl_fstat, - .lstat_fn = vfs_gpfs_lstat, + .lstat_fn = nfs4_acl_lstat, .fstatat_fn = vfs_gpfs_fstatat, .fntimes_fn = vfs_gpfs_fntimes, .aio_force_fn = vfs_gpfs_aio_force, -- 2.39.3 From 61ee4da28dac6a3c8775ca0e2fc26b700f9e4c35 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:35:21 -0700 Subject: [PATCH 11/16] vfs_gpfs: Move vfs_gpfs_fstatat to nfs4_acls.c and rename function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All stat DAC_CAP_OVERRIDE code is being moved to nfs4_acls.c to allow reuse. Move the vfs_gpfs_fstatat function and rename it to the more generic name nfs4_acl_fstat. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 5fd73e93af9d015c9e65a6d4d16229476a541cfc) --- source3/modules/nfs4_acls.c | 25 +++++++++++++++++++++++++ source3/modules/nfs4_acls.h | 6 ++++++ source3/modules/vfs_gpfs.c | 27 +-------------------------- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 83a5e034471..7bb115c6ca8 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -240,6 +240,31 @@ int nfs4_acl_lstat(struct vfs_handle_struct *handle, return ret; } +int nfs4_acl_fstatat(struct vfs_handle_struct *handle, + const struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + SMB_STRUCT_STAT *sbuf, + int flags) +{ + int ret; + + ret = SMB_VFS_NEXT_FSTATAT(handle, dirfsp, smb_fname, sbuf, flags); + if (ret == -1 && errno == EACCES) { + bool fake_dctime = + lp_fake_directory_create_times(SNUM(handle->conn)); + + DBG_DEBUG("fstatat for %s failed with EACCES. Trying with " + "CAP_DAC_OVERRIDE.\n", dirfsp->fsp_name->base_name); + ret = fstatat_with_cap_dac_override(fsp_get_pathref_fd(dirfsp), + smb_fname->base_name, + sbuf, + flags, + fake_dctime); + } + + return ret; +} + /************************************************ Split the ACE flag mapping between nfs4 and Windows into two separate functions rather than trying to do diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index ee97207387b..1fafaafe76a 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -140,6 +140,12 @@ int nfs4_acl_fstat(struct vfs_handle_struct *handle, int nfs4_acl_lstat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname); +int nfs4_acl_fstatat(struct vfs_handle_struct *handle, + const struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + SMB_STRUCT_STAT *sbuf, + int flags); + struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx); /* prop's contents are copied */ diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 70294635f63..a5339ab41d1 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1594,31 +1594,6 @@ static NTSTATUS vfs_gpfs_fset_dos_attributes(struct vfs_handle_struct *handle, return NT_STATUS_OK; } -static int vfs_gpfs_fstatat(struct vfs_handle_struct *handle, - const struct files_struct *dirfsp, - const struct smb_filename *smb_fname, - SMB_STRUCT_STAT *sbuf, - int flags) -{ - int ret; - - ret = SMB_VFS_NEXT_FSTATAT(handle, dirfsp, smb_fname, sbuf, flags); - if (ret == -1 && errno == EACCES) { - bool fake_dctime = - lp_fake_directory_create_times(SNUM(handle->conn)); - - DBG_DEBUG("fstatat for %s failed with EACCES. Trying with " - "CAP_DAC_OVERRIDE.\n", dirfsp->fsp_name->base_name); - ret = fstatat_with_cap_dac_override(fsp_get_pathref_fd(dirfsp), - smb_fname->base_name, - sbuf, - flags, - fake_dctime); - } - - return ret; -} - static int timespec_to_gpfs_time( struct timespec ts, gpfs_timestruc_t *gt, int idx, int *flags) { @@ -2561,7 +2536,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .stat_fn = nfs4_acl_stat, .fstat_fn = nfs4_acl_fstat, .lstat_fn = nfs4_acl_lstat, - .fstatat_fn = vfs_gpfs_fstatat, + .fstatat_fn = nfs4_acl_fstatat, .fntimes_fn = vfs_gpfs_fntimes, .aio_force_fn = vfs_gpfs_aio_force, .sendfile_fn = vfs_gpfs_sendfile, -- 2.39.3 From 0e9ff5ee757d89c5af829053f5fa44947607494a Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:37:25 -0700 Subject: [PATCH 12/16] nfs4_acls: Make fstatat_with_cap_dac_override static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No other module is calling this function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 8831eeca1d70c909e15c86c8af6a7b1d7b0d3b5b) --- source3/modules/nfs4_acls.c | 10 +++++----- source3/modules/nfs4_acls.h | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 7bb115c6ca8..06742be7e70 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -116,11 +116,11 @@ int smbacl4_get_vfs_params(struct connection_struct *conn, return 0; } -int fstatat_with_cap_dac_override(int fd, - const char *pathname, - SMB_STRUCT_STAT *sbuf, - int flags, - bool fake_dir_create_times) +static int fstatat_with_cap_dac_override(int fd, + const char *pathname, + SMB_STRUCT_STAT *sbuf, + int flags, + bool fake_dir_create_times) { int ret; diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 1fafaafe76a..829252b6104 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -118,12 +118,6 @@ struct smbacl4_vfs_params { int smbacl4_get_vfs_params(struct connection_struct *conn, struct smbacl4_vfs_params *params); -int fstatat_with_cap_dac_override(int fd, - const char *pathname, - SMB_STRUCT_STAT *sbuf, - int flags, - bool fake_dir_create_times); - int stat_with_cap_dac_override(struct vfs_handle_struct *handle, struct smb_filename *smb_fname, int flag); -- 2.39.3 From cba9cb3e0e940a2bae6d107dc53476b1e8a56cf6 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:38:46 -0700 Subject: [PATCH 13/16] nfs4_acls: Make stat_with_cap_dac_override static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No other module is calling this function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 0f664f016207894e0a156b9e1f4db7677c264205) --- source3/modules/nfs4_acls.c | 4 ++-- source3/modules/nfs4_acls.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 06742be7e70..ac62569d597 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -135,8 +135,8 @@ static int fstatat_with_cap_dac_override(int fd, return ret; } -int stat_with_cap_dac_override(struct vfs_handle_struct *handle, - struct smb_filename *smb_fname, int flag) +static int stat_with_cap_dac_override(struct vfs_handle_struct *handle, + struct smb_filename *smb_fname, int flag) { bool fake_dctime = lp_fake_directory_create_times(SNUM(handle->conn)); int fd = -1; diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 829252b6104..03e2064e659 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -118,9 +118,6 @@ struct smbacl4_vfs_params { int smbacl4_get_vfs_params(struct connection_struct *conn, struct smbacl4_vfs_params *params); -int stat_with_cap_dac_override(struct vfs_handle_struct *handle, - struct smb_filename *smb_fname, int flag); - int nfs4_acl_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname); -- 2.39.3 From 396f51329b9f3f0f0e85c6c931324c79e9fc4c9f Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:39:57 -0700 Subject: [PATCH 14/16] nfs4_acls: Make fstat_with_cap_dac_override static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No other module is calling this function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit bffd8bd8c32fea738824b807eb9e5f97a609493e) --- source3/modules/nfs4_acls.c | 4 ++-- source3/modules/nfs4_acls.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index ac62569d597..4a1caa36d3c 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -192,8 +192,8 @@ int nfs4_acl_stat(struct vfs_handle_struct *handle, return ret; } -int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, - bool fake_dir_create_times) +static int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, + bool fake_dir_create_times) { int ret; diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 03e2064e659..011b9da5554 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -121,9 +121,6 @@ int smbacl4_get_vfs_params(struct connection_struct *conn, int nfs4_acl_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname); -int fstat_with_cap_dac_override(int fd, SMB_STRUCT_STAT *sbuf, - bool fake_dir_create_times); - int nfs4_acl_fstat(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf); -- 2.39.3 From de93892d776252d135db0df0629a76bfd5edae2f Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:42:13 -0700 Subject: [PATCH 15/16] vfs_aixacl2: Call stat DAC_CAP_OVERRIDE functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke (cherry picked from commit 9cac91542128888bde79391ca99291a76752f334) --- source3/modules/vfs_aixacl2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c index 26d2a566907..8a9ae314cdb 100644 --- a/source3/modules/vfs_aixacl2.c +++ b/source3/modules/vfs_aixacl2.c @@ -460,6 +460,10 @@ int aixjfs2_sys_acl_delete_def_fd(vfs_handle_struct *handle, } static struct vfs_fn_pointers vfs_aixacl2_fns = { + .stat_fn = nfs4_acl_stat, + .fstat_fn = nfs4_acl_fstat, + .lstat_fn = nfs4_acl_lstat, + .fstatat_fn = nfs4_acl_fstatat, .fget_nt_acl_fn = aixjfs2_fget_nt_acl, .fset_nt_acl_fn = aixjfs2_fset_nt_acl, .sys_acl_get_fd_fn = aixjfs2_sys_acl_get_fd, -- 2.39.3 From 5fe1567b1338ee8479596a5360d7fafbf839b28d Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 9 Nov 2023 12:44:02 -0700 Subject: [PATCH 16/16] vfs_zfsacl: Call stat CAP_DAC_OVERRIDE functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15507 Signed-off-by: Christof Schmitt Reviewed-by: Björn Jacke Autobuild-User(master): Björn Jacke Autobuild-Date(master): Wed Nov 15 19:55:07 UTC 2023 on atb-devel-224 (cherry picked from commit 12e5c15a97b45aa01fc3f4274f8ba9cf7d1ddbe9) --- source3/modules/vfs_zfsacl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c index d69d7003110..2bc0d1c8c6e 100644 --- a/source3/modules/vfs_zfsacl.c +++ b/source3/modules/vfs_zfsacl.c @@ -487,6 +487,10 @@ static int zfsacl_connect(struct vfs_handle_struct *handle, static struct vfs_fn_pointers zfsacl_fns = { .connect_fn = zfsacl_connect, + .stat_fn = nfs4_acl_stat, + .fstat_fn = nfs4_acl_fstat, + .lstat_fn = nfs4_acl_lstat, + .fstatat_fn = nfs4_acl_fstatat, .sys_acl_get_fd_fn = zfsacl_fail__sys_acl_get_fd, .sys_acl_blob_get_fd_fn = zfsacl_fail__sys_acl_blob_get_fd, .sys_acl_set_fd_fn = zfsacl_fail__sys_acl_set_fd, -- 2.39.3