selftest/Samba4: make use of get_cmd_env_vars() to setup all relevant env variables
[samba.git] / source3 / modules / vfs_shadow_copy.c
index 36545ee05f5d5e8f2d11828a18ed6c3b625fddda..62b929188861a90cc227080bf8fd22aed1546f9c 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "smbd/smbd.h"
 #include "ntioctl.h"
+#include "source3/smbd/dir.h"
 
 /*
     Please read the VFS module Samba-HowTo-Collection.
@@ -98,7 +99,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 +128,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;
 
@@ -139,21 +139,6 @@ static struct dirent *shadow_copy_readdir(vfs_handle_struct *handle,
        return NULL;
 }
 
-static void shadow_copy_seekdir(struct vfs_handle_struct *handle, DIR *_dirp, long offset)
-{
-       shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
-
-       if (offset < dirp->num) {
-               dirp->pos = offset ;
-       }
-}
-
-static long shadow_copy_telldir(struct vfs_handle_struct *handle, DIR *_dirp)
-{
-       shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
-       return( dirp->pos ) ;
-}
-
 static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, DIR *_dirp)
 {
        shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -210,7 +195,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;
                }
@@ -261,8 +246,6 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
 static struct vfs_fn_pointers vfs_shadow_copy_fns = {
        .fdopendir_fn = shadow_copy_fdopendir,
        .readdir_fn = shadow_copy_readdir,
-       .seekdir_fn = shadow_copy_seekdir,
-       .telldir_fn = shadow_copy_telldir,
        .rewind_dir_fn = shadow_copy_rewinddir,
        .closedir_fn = shadow_copy_closedir,
        .get_shadow_copy_data_fn = shadow_copy_get_shadow_copy_data,