selftest/Samba4: make use of get_cmd_env_vars() to setup all relevant env variables
[samba.git] / source3 / modules / vfs_gpfs.c
index aa25a76aecbebfb8cce3e75cce6d5176f1bef2f4..a8b4e38ff88c00c61285258f92c4f4a67de152a2 100644 (file)
@@ -1588,46 +1588,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,
-                           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)
 {
@@ -2562,8 +2522,8 @@ 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,
-       .fstatat_fn = vfs_gpfs_fstatat,
+       .lstat_fn = nfs4_acl_lstat,
+       .fstatat_fn = nfs4_acl_fstatat,
        .fntimes_fn = vfs_gpfs_fntimes,
        .aio_force_fn = vfs_gpfs_aio_force,
        .sendfile_fn = vfs_gpfs_sendfile,