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)
{
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);
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)
.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,