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/modules/vfs_default.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 42671a1dbe..427e3af9ca 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2227,6 +2227,34 @@ static int vfswrap_set_offline(struct vfs_handle_struct *handle, return -1; } +static NTSTATUS vfswrap_durable_cookie(struct vfs_handle_struct *handle, + struct files_struct *fsp, + TALLOC_CTX *mem_ctx, + DATA_BLOB *cookie) +{ + return NT_STATUS_NOT_SUPPORTED; +} + +static NTSTATUS vfswrap_durable_disconnect(struct vfs_handle_struct *handle, + struct files_struct *fsp, + const DATA_BLOB old_cookie, + TALLOC_CTX *mem_ctx, + DATA_BLOB *new_cookie) +{ + return NT_STATUS_NOT_SUPPORTED; +} + +static NTSTATUS vfswrap_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) +{ + return NT_STATUS_NOT_SUPPORTED; +} + static struct vfs_fn_pointers vfs_default_fns = { /* Disk operations */ @@ -2344,7 +2372,12 @@ static struct vfs_fn_pointers vfs_default_fns = { /* offline operations */ .is_offline_fn = vfswrap_is_offline, - .set_offline_fn = vfswrap_set_offline + .set_offline_fn = vfswrap_set_offline, + + /* durable handle operations */ + .durable_cookie_fn = vfswrap_durable_cookie, + .durable_disconnect_fn = vfswrap_durable_disconnect, + .durable_reconnect_fn = vfswrap_durable_reconnect, }; NTSTATUS vfs_default_init(void); -- cgit