[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Jun 23 18:30:01 UTC 2023
The branch, master has been updated
via 4a8cfe1650a vfs: Remove "sbuf" from readdir_fn()
via 95fd166effe smbd: Remove unused "sbuf" argument from vfs_readdirname()
via daf6f2f7a1a smbd: Remove unused "sbuf" argument from ReadDirName()
via f36bdcc0ca6 smbd: Remove unused "pst" argument from dptr_ReadDirName()
via ea670b66c46 smbd: Don't use "sbuf" in smbd_dirptr_get_entry()
via 3f97b6a4f7e smbd: Make sure smb_fname->st is valid in smbd_dirptr_get_entry
from c837ecf442c python:samba: Fix code spelling
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4a8cfe1650a1a22ab53c04f5f872bc8f59bc2c1b
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 20 12:42:52 2023 +0200
vfs: Remove "sbuf" from readdir_fn()
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Jun 23 18:29:40 UTC 2023 on atb-devel-224
commit 95fd166effe20089e54553cdde3241bf9233b5a3
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 20 12:29:29 2023 +0200
smbd: Remove unused "sbuf" argument from vfs_readdirname()
The only caller did not use the result.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit daf6f2f7a1ac6e85b62ed0b8e41d0a300d69ee5e
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 20 12:25:45 2023 +0200
smbd: Remove unused "sbuf" argument from ReadDirName()
Nobody used that anymore, most callers had passed in NULL anyway.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f36bdcc0ca6b25ef27f0cc1e1f3450936f7bb42c
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 20 12:19:15 2023 +0200
smbd: Remove unused "pst" argument from dptr_ReadDirName()
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ea670b66c4662230d8cc866530d01606ca4656cc
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 20 12:03:35 2023 +0200
smbd: Don't use "sbuf" in smbd_dirptr_get_entry()
openat_pathref_fsp() does not need this anymore.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 3f97b6a4f7ed3240068fbfc1441f5fd7c93a02f3
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jun 22 09:52:09 2023 +0200
smbd: Make sure smb_fname->st is valid in smbd_dirptr_get_entry
This simplifies the two mode_fn()s we have.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
examples/VFS/skel_opaque.c | 3 +-
examples/VFS/skel_transparent.c | 8 ++-
source3/include/vfs.h | 10 ++--
source3/include/vfs_macros.h | 8 +--
source3/modules/vfs_cap.c | 8 ++-
source3/modules/vfs_ceph.c | 7 +--
source3/modules/vfs_ceph_snapshots.c | 8 +--
source3/modules/vfs_default.c | 43 +---------------
source3/modules/vfs_dirsort.c | 11 ++---
source3/modules/vfs_fruit.c | 8 +--
source3/modules/vfs_full_audit.c | 5 +-
source3/modules/vfs_glusterfs.c | 19 ++-----
source3/modules/vfs_media_harmony.c | 10 ++--
source3/modules/vfs_not_implemented.c | 3 +-
source3/modules/vfs_shadow_copy.c | 7 ++-
source3/modules/vfs_shadow_copy2.c | 93 +----------------------------------
source3/modules/vfs_streams_depot.c | 4 +-
source3/modules/vfs_time_audit.c | 5 +-
source3/modules/vfs_unityed_media.c | 10 ++--
source3/modules/vfs_widelinks.c | 36 --------------
source3/smbd/close.c | 10 ++--
source3/smbd/dir.c | 54 +++++++++-----------
source3/smbd/filename.c | 2 +-
source3/smbd/msdfs.c | 8 +--
source3/smbd/proto.h | 8 +--
source3/smbd/smb1_reply.c | 14 ------
source3/smbd/smb1_trans2.c | 4 +-
source3/smbd/smb2_trans2.c | 8 +--
source3/smbd/vfs.c | 8 ++-
source3/torture/cmd_vfs.c | 8 +--
30 files changed, 84 insertions(+), 346 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index cbaf9a272a8..255fa830402 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -157,8 +157,7 @@ static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
static struct dirent *skel_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
return NULL;
}
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 9c08b87f7c7..461228f09af 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -163,12 +163,10 @@ static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
}
-static struct dirent *skel_readdir(vfs_handle_struct *handle,
- struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+static struct dirent *
+skel_readdir(vfs_handle_struct *handle, struct files_struct *dirfsp, DIR *dirp)
{
- return SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, sbuf);
+ return SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp);
}
static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index eafc432be43..dfae16fbc24 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -380,6 +380,7 @@
* Version 48 - Add dirfsp to connectpath_fn()
* Change to Version 49 - will ship with 4.19
* Version 49 - remove seekdir and telldir
+ * Version 49 - remove "sbuf" argument from readdir_fn()
*/
#define SMB_VFS_INTERFACE_VERSION 49
@@ -967,8 +968,7 @@ struct vfs_fn_pointers {
DIR *(*fdopendir_fn)(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32_t attributes);
struct dirent *(*readdir_fn)(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf);
+ DIR *dirp);
void (*rewind_dir_fn)(struct vfs_handle_struct *handle, DIR *dirp);
int (*mkdirat_fn)(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
@@ -1462,8 +1462,7 @@ DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
uint32_t attributes);
struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf);
+ DIR *dirp);
void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
DIR *dirp);
int smb_vfs_call_mkdirat(struct vfs_handle_struct *handle,
@@ -1904,8 +1903,7 @@ DIR *vfs_not_implemented_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
const char *mask, uint32_t attr);
struct dirent *vfs_not_implemented_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf);
+ DIR *dirp);
void vfs_not_implemented_rewind_dir(vfs_handle_struct *handle, DIR *dirp);
int vfs_not_implemented_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 29ce22e98c5..9196f6e5e40 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -111,10 +111,10 @@
#define SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr) \
smb_vfs_call_fdopendir((handle)->next, (fsp), (mask), (attr))
-#define SMB_VFS_READDIR(conn, dirfsp, dirp, sbuf) \
- smb_vfs_call_readdir((conn)->vfs_handles, (dirfsp), (dirp), (sbuf))
-#define SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, sbuf) \
- smb_vfs_call_readdir((handle)->next, (dirfsp), (dirp), (sbuf))
+#define SMB_VFS_READDIR(conn, dirfsp, dirp) \
+ smb_vfs_call_readdir((conn)->vfs_handles, (dirfsp), (dirp))
+#define SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp) \
+ smb_vfs_call_readdir((handle)->next, (dirfsp), (dirp))
#define SMB_VFS_REWINDDIR(conn, dirp) \
smb_vfs_call_rewind_dir((conn)->vfs_handles, (dirp))
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index ac2c1b0410d..3553e118cc2 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -84,10 +84,8 @@ static int cap_get_quota(vfs_handle_struct *handle,
return SMB_VFS_NEXT_GET_QUOTA(handle, cap_smb_fname, qtype, id, dq);
}
-static struct dirent *cap_readdir(vfs_handle_struct *handle,
- struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+static struct dirent *
+cap_readdir(vfs_handle_struct *handle, struct files_struct *dirfsp, DIR *dirp)
{
struct dirent *result;
struct dirent *newdirent;
@@ -95,7 +93,7 @@ static struct dirent *cap_readdir(vfs_handle_struct *handle,
size_t newnamelen;
DEBUG(3,("cap: cap_readdir\n"));
- result = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, NULL);
+ result = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp);
if (!result) {
return NULL;
}
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index af303ac60b7..d7772c62119 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -451,8 +451,7 @@ static DIR *cephwrap_fdopendir(struct vfs_handle_struct *handle,
static struct dirent *cephwrap_readdir(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
struct dirent *result;
@@ -460,10 +459,6 @@ static struct dirent *cephwrap_readdir(struct vfs_handle_struct *handle,
result = ceph_readdir(handle->data, (struct ceph_dir_result *) dirp);
DBG_DEBUG("[CEPH] readdir(...) = %p\n", result);
- /* Default Posix readdir() does not give us stat info.
- * Set to invalid to indicate we didn't return this info. */
- if (sbuf)
- SET_STAT_INVALID(*sbuf);
return result;
}
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index c09b1895f88..f9ae977918c 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -264,9 +264,7 @@ static int ceph_snap_enum_snapdir(struct vfs_handle_struct *handle,
sc_data->num_volumes = 0;
sc_data->labels = NULL;
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
if (ISDOT(dname) || ISDOTDOT(dname)) {
TALLOC_FREE(talloced);
continue;
@@ -587,9 +585,7 @@ static int ceph_snap_gmt_convert_dir(struct vfs_handle_struct *handle,
goto err_out;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
struct smb_filename *smb_fname = NULL;
struct smb_filename *atname = NULL;
time_t snap_secs = 0;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 1ea0dded619..1d4b9b1a840 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -594,58 +594,17 @@ static DIR *vfswrap_fdopendir(vfs_handle_struct *handle,
return result;
}
-
static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
struct dirent *result;
- bool fake_ctime = lp_fake_directory_create_times(SNUM(handle->conn));
- int flags = AT_SYMLINK_NOFOLLOW;
- SMB_STRUCT_STAT st = {0};
- int ret;
START_PROFILE(syscall_readdir);
result = readdir(dirp);
END_PROFILE(syscall_readdir);
- if (sbuf == NULL) {
- return result;
- }
- if (result == NULL) {
- return NULL;
- }
-
- /*
- * Default Posix readdir() does not give us stat info.
- * Set to invalid to indicate we didn't return this info.
- */
- SET_STAT_INVALID(*sbuf);
-
- ret = sys_fstatat(dirfd(dirp),
- result->d_name,
- &st,
- flags,
- fake_ctime);
- if (ret != 0) {
- return result;
- }
-
- /*
- * As this is an optimization, ignore it if we stat'ed a
- * symlink for non-POSIX context. Make the caller do it again
- * as we don't know if they wanted the link info, or its
- * target info.
- */
- if (S_ISLNK(st.st_ex_mode) &&
- !(dirfsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH))
- {
- return result;
- }
- *sbuf = st;
-
return result;
}
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index 89637aa38f2..c4baf819b03 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -79,10 +79,7 @@ static bool open_and_sort_dir(vfs_handle_struct *handle,
return false;
}
- dp = SMB_VFS_NEXT_READDIR(handle,
- data->fsp,
- data->source_directory,
- NULL);
+ dp = SMB_VFS_NEXT_READDIR(handle, data->fsp, data->source_directory);
if (dp == NULL) {
return false;
}
@@ -125,8 +122,7 @@ static bool open_and_sort_dir(vfs_handle_struct *handle,
total_count++;
dp = SMB_VFS_NEXT_READDIR(handle,
data->fsp,
- data->source_directory,
- NULL);
+ data->source_directory);
} while (dp != NULL);
data->number_of_entries = total_count;
@@ -185,8 +181,7 @@ static DIR *dirsort_fdopendir(vfs_handle_struct *handle,
static struct dirent *dirsort_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
struct dirsort_privates *data = NULL;
struct timespec current_mtime;
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 8be6b4c7791..02f04196e48 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -5224,9 +5224,7 @@ static bool fruit_get_num_bands(vfs_handle_struct *handle,
nbands = 0;
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
if (ISDOT(dname) || ISDOTDOT(dname)) {
continue;
}
@@ -5365,9 +5363,7 @@ static uint64_t fruit_disk_free(vfs_handle_struct *handle,
return UINT64_MAX;
}
- while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
- != NULL)
- {
+ while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
ok = fruit_tmsize_do_dirent(handle, &state, dname);
if (!ok) {
TALLOC_FREE(talloced);
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index b407de0d778..9fd8a751572 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1015,12 +1015,11 @@ static DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
static struct dirent *smb_full_audit_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
struct dirent *result;
- result = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, sbuf);
+ result = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp);
/* This operation has no reasonable error condition
* (End of dir is also failure), so always succeed.
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 0c2d6950421..a1c4dfcd64f 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -649,34 +649,21 @@ static int vfs_gluster_closedir(struct vfs_handle_struct *handle, DIR *dirp)
static struct dirent *vfs_gluster_readdir(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
static char direntbuf[512];
int ret;
- struct stat stat;
struct dirent *dirent = 0;
START_PROFILE(syscall_readdir);
- if (sbuf != NULL) {
- ret = glfs_readdirplus_r((void *)dirp, &stat, (void *)direntbuf,
- &dirent);
- } else {
- ret = glfs_readdir_r((void *)dirp, (void *)direntbuf, &dirent);
- }
+
+ ret = glfs_readdir_r((void *)dirp, (void *)direntbuf, &dirent);
if ((ret < 0) || (dirent == NULL)) {
END_PROFILE(syscall_readdir);
return NULL;
}
- if (sbuf != NULL) {
- SET_STAT_INVALID(*sbuf);
- if (!S_ISLNK(stat.st_mode)) {
- smb_stat_ex_from_stat(sbuf, &stat);
- }
- }
-
END_PROFILE(syscall_readdir);
return dirent;
}
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index ceace9c5b2d..a027254c6b3 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -817,10 +817,8 @@ err:
* End of data: return NULL
* Failure: set errno, return NULL
*/
-static struct dirent *mh_readdir(vfs_handle_struct *handle,
- struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+static struct dirent *
+mh_readdir(vfs_handle_struct *handle, struct files_struct *dirfsp, DIR *dirp)
{
mh_dirinfo_struct* dirInfo = (mh_dirinfo_struct*)dirp;
struct dirent *d = NULL;
@@ -843,7 +841,7 @@ static struct dirent *mh_readdir(vfs_handle_struct *handle,
if (! dirInfo->isInMediaFiles)
{
- d = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirInfo->dirstream, sbuf);
+ d = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirInfo->dirstream);
goto out;
}
@@ -853,7 +851,7 @@ static struct dirent *mh_readdir(vfs_handle_struct *handle,
bool isAppleDouble;
skip = False;
- d = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirInfo->dirstream, sbuf);
+ d = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirInfo->dirstream);
if (d == NULL)
{
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index aeec1a4a376..b00a4993bc5 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -168,8 +168,7 @@ DIR *vfs_not_implemented_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
_PUBLIC_
struct dirent *vfs_not_implemented_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *dirp)
{
errno = ENOSYS;
return NULL;
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index 7b1ff9c7fc1..e87cefbb694 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -98,7 +98,7 @@ static DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
while (True) {
struct dirent *d;
- d = SMB_VFS_NEXT_READDIR(handle, fsp, p, NULL);
+ d = SMB_VFS_NEXT_READDIR(handle, fsp, p);
if (d == NULL) {
break;
}
@@ -127,8 +127,7 @@ static DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
static struct dirent *shadow_copy_readdir(vfs_handle_struct *handle,
struct files_struct *dirfsp,
- DIR *_dirp,
- SMB_STRUCT_STAT *sbuf)
+ DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -195,7 +194,7 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
SHADOW_COPY_LABEL *tlabels;
int ret;
- dname = ReadDirName(dir_hnd, NULL, &talloced);
+ dname = ReadDirName(dir_hnd, &talloced);
if (dname == NULL) {
break;
}
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 2bbd3a5d35f..9a69259edd8 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -2276,7 +2276,7 @@ static int shadow_copy2_get_shadow_copy_data(
time(&(priv->snaps->fetch_time));
}
- while ((d = SMB_VFS_NEXT_READDIR(handle, dirfsp, p, NULL))) {
+ while ((d = SMB_VFS_NEXT_READDIR(handle, dirfsp, p))) {
char snapshot[GMT_NAME_LEN+1];
SHADOW_COPY_LABEL *tlabels;
@@ -3373,96 +3373,6 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle,
return 0;
}
-static struct dirent *shadow_copy2_readdir(vfs_handle_struct *handle,
- struct files_struct *dirfsp,
- DIR *dirp,
- SMB_STRUCT_STAT *sbuf)
-{
- struct shadow_copy2_private *priv = NULL;
- struct dirent *ent = NULL;
- struct smb_filename atname;
- struct smb_filename *full_fname = NULL;
- time_t timestamp = 0;
- char *stripped = NULL;
- char *conv = NULL;
- char *abspath = NULL;
- bool converted = false;
-
- SMB_VFS_HANDLE_GET_DATA(handle, priv, struct shadow_copy2_private,
- return NULL);
-
- ent = SMB_VFS_NEXT_READDIR(handle, dirfsp, dirp, sbuf);
- if (ent == NULL) {
- return NULL;
- }
- if (sbuf == NULL) {
- return ent;
- }
- if (ISDOT(dirfsp->fsp_name->base_name) && ISDOTDOT(ent->d_name)) {
- return ent;
- }
-
- atname = (struct smb_filename) {
- .base_name = ent->d_name,
- .twrp = dirfsp->fsp_name->twrp,
- .flags = dirfsp->fsp_name->flags,
- };
-
- full_fname = full_path_from_dirfsp_atname(talloc_tos(),
- dirfsp,
- &atname);
- if (full_fname == NULL) {
- return NULL;
- }
-
- if (!shadow_copy2_strip_snapshot_converted(talloc_tos(),
--
Samba Shared Repository
More information about the samba-cvs
mailing list