From 35260ae89e2970712e2a141cd034b513076fc1ed Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 4 Sep 2012 18:04:11 +0200 Subject: s3:vfs: add durable VFS operations This allows a VFS module to implement durable handles in different ways. Pair-Programmed-With: Stefan Metzmacher --- source3/smbd/vfs.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'source3/smbd/vfs.c') diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 0a259cc915..bb9549c887 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2330,3 +2330,37 @@ int smb_vfs_call_set_offline(struct vfs_handle_struct *handle, VFS_FIND(set_offline); return handle->fns->set_offline_fn(handle, fname); } + +NTSTATUS smb_vfs_call_durable_cookie(struct vfs_handle_struct *handle, + struct files_struct *fsp, + TALLOC_CTX *mem_ctx, + DATA_BLOB *cookie) +{ + VFS_FIND(durable_cookie); + return handle->fns->durable_cookie_fn(handle, fsp, mem_ctx, cookie); +} + +NTSTATUS smb_vfs_call_durable_disconnect(struct vfs_handle_struct *handle, + struct files_struct *fsp, + const DATA_BLOB old_cookie, + TALLOC_CTX *mem_ctx, + DATA_BLOB *new_cookie) +{ + VFS_FIND(durable_disconnect); + return handle->fns->durable_disconnect_fn(handle, fsp, old_cookie, + mem_ctx, new_cookie); +} + +NTSTATUS smb_vfs_call_durable_reconnect(struct vfs_handle_struct *handle, + struct smb_request *smb1req, + struct smbXsrv_open *op, + const DATA_BLOB old_cookie, + TALLOC_CTX *mem_ctx, + struct files_struct **fsp, + DATA_BLOB *new_cookie) +{ + VFS_FIND(durable_reconnect); + return handle->fns->durable_reconnect_fn(handle, smb1req, op, + old_cookie, mem_ctx, fsp, + new_cookie); +} -- cgit