diff options
author | Jeremy Allison <jra@samba.org> | 2005-06-13 16:49:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:57:11 -0500 |
commit | 9625ed4a36cadfe5901ecf97935c75f0471badd5 (patch) | |
tree | 0cb4988f2a4b84a28d191746cded527e6f2dc80b /source3/modules | |
parent | f245e776448645ed5e6f779662ca228570a3ddde (diff) | |
download | samba-9625ed4a36cadfe5901ecf97935c75f0471badd5.tar.gz samba-9625ed4a36cadfe5901ecf97935c75f0471badd5.tar.bz2 samba-9625ed4a36cadfe5901ecf97935c75f0471badd5.zip |
r7541: Patch from core@road-star.jp for bug #2792. Ensure the shadow copy
module hooks seekdir, telldir, rewinddir to match updated large
directory code.
Jeremy.
(This used to be commit 0cdc62b60b6152cb67e517d70f4e4681dca8f4df)
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_shadow_copy.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c index 513f33b3cb..d957afb923 100644 --- a/source3/modules/vfs_shadow_copy.c +++ b/source3/modules/vfs_shadow_copy.c @@ -133,6 +133,27 @@ SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, connection_str return NULL; } +static void shadow_copy_seekdir(struct vfs_handle_struct *handle, struct connection_struct *conn, 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, struct connection_struct *conn, DIR *_dirp) +{ + shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp; + return( dirp->pos ) ; +} + +static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *_dirp) +{ + shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp; + dirp->pos = 0 ; +} + int shadow_copy_closedir(vfs_handle_struct *handle, connection_struct *conn, DIR *_dirp) { shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp; @@ -200,6 +221,9 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_str static vfs_op_tuple shadow_copy_ops[] = { {SMB_VFS_OP(shadow_copy_opendir), SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(shadow_copy_readdir), SMB_VFS_OP_READDIR, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(shadow_copy_seekdir), SMB_VFS_OP_SEEKDIR, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(shadow_copy_telldir), SMB_VFS_OP_TELLDIR, SMB_VFS_LAYER_TRANSPARENT}, + {SMB_VFS_OP(shadow_copy_rewinddir), SMB_VFS_OP_REWINDDIR, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(shadow_copy_closedir), SMB_VFS_OP_CLOSEDIR, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(shadow_copy_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,SMB_VFS_LAYER_OPAQUE}, |