<member>set_nt_acl</member>
<member>set_quota</member>
<member>setxattr</member>
+ <member>snap_check_path</member>
+ <member>snap_create_send</member>
+ <member>snap_create_recv</member>
+ <member>snap_delete_send</member>
+ <member>snap_delete_recv</member>
<member>stat</member>
<member>statvfs</member>
<member>symlink</member>
return NULL;
}
+static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+static struct tevent_req *skel_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ return NULL;
+}
+
+static NTSTATUS skel_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+static struct tevent_req *skel_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ return NULL;
+}
+
+static NTSTATUS skel_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return NULL;
.statvfs_fn = skel_statvfs,
.fs_capabilities_fn = skel_fs_capabilities,
.get_dfs_referrals_fn = skel_get_dfs_referrals,
+ .snap_check_path_fn = skel_snap_check_path,
+ .snap_create_send_fn = skel_snap_create_send,
+ .snap_create_recv_fn = skel_snap_create_recv,
+ .snap_delete_send_fn = skel_snap_delete_send,
+ .snap_delete_recv_fn = skel_snap_delete_recv,
/* Directory operations */
return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
}
+static NTSTATUS skel_snap_check_path(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ return SMB_VFS_NEXT_SNAP_CHECK_PATH(handle, mem_ctx, service_path,
+ base_volume);
+}
+
+static struct tevent_req *skel_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ return SMB_VFS_NEXT_SNAP_CREATE_SEND(handle, mem_ctx, ev, base_volume,
+ tstamp, rw);
+}
+
+static NTSTATUS skel_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ return SMB_VFS_NEXT_SNAP_CREATE_RECV(handle, req, mem_ctx, base_path,
+ snap_path);
+}
+
+static struct tevent_req *skel_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ return SMB_VFS_NEXT_SNAP_DELETE_SEND(handle, mem_ctx, ev, snap_path);
+}
+
+static NTSTATUS skel_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ return SMB_VFS_NEXT_SNAP_DELETE_RECV(handle, req);
+}
+
static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
.statvfs_fn = skel_statvfs,
.fs_capabilities_fn = skel_fs_capabilities,
.get_dfs_referrals_fn = skel_get_dfs_referrals,
+ .snap_check_path_fn = skel_snap_check_path,
+ .snap_create_send_fn = skel_snap_create_send,
+ .snap_create_recv_fn = skel_snap_create_recv,
+ .snap_delete_send_fn = skel_snap_delete_send,
+ .snap_delete_recv_fn = skel_snap_delete_recv,
/* Directory operations */
/* Leave at 30 - not yet released. Added conn->cwd to save vfs_GetWd() calls. */
/* Leave at 30 - not yet released. Changed sys_acl_blob_get_file interface to remove type */
/* Leave at 30 - not yet released. add SMB_VFS_COPY_CHUNK() */
+/* Leave at 30 - not yet released. add snapshot create/delete calls */
#define SMB_VFS_INTERFACE_VERSION 30
/*
NTSTATUS (*copy_chunk_recv_fn)(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied);
+ NTSTATUS (*snap_check_path_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume);
+ struct tevent_req *(*snap_create_send_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw);
+ NTSTATUS (*snap_create_recv_fn)(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path);
+ struct tevent_req *(*snap_delete_send_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path);
+ NTSTATUS (*snap_delete_recv_fn)(struct vfs_handle_struct *handle,
+ struct tevent_req *req);
NTSTATUS (*streaminfo_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
NTSTATUS smb_vfs_call_copy_chunk_recv(struct vfs_handle_struct *handle,
struct tevent_req *req,
off_t *copied);
+NTSTATUS smb_vfs_call_snap_check_path(vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume);
+struct tevent_req *smb_vfs_call_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw);
+NTSTATUS smb_vfs_call_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path);
+struct tevent_req *smb_vfs_call_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path);
+NTSTATUS smb_vfs_call_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req);
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,
#define SMB_VFS_NEXT_COPY_CHUNK_RECV(handle, req, copied) \
smb_vfs_call_copy_chunk_recv((handle)->next, (req), (copied))
+#define SMB_VFS_SNAP_CHECK_PATH(conn, mem_ctx, service_path, base_volume) \
+ smb_vfs_call_snap_check_path((conn)->vfs_handles, (mem_ctx), (service_path), (base_volume))
+#define SMB_VFS_NEXT_SNAP_CHECK_PATH(handle, mem_ctx, service_path, base_volume) \
+ smb_vfs_call_snap_check_path((handle)->next, (mem_ctx), (service_path), (base_volume))
+
+#define SMB_VFS_SNAP_CREATE_SEND(conn, mem_ctx, ev, base_volume, tstamp, rw) \
+ smb_vfs_call_snap_create_send((conn)->vfs_handles, (mem_ctx), (ev), (base_volume), (tstamp), (rw))
+#define SMB_VFS_NEXT_SNAP_CREATE_SEND(handle, mem_ctx, ev, base_volume, tstamp, rw) \
+ smb_vfs_call_snap_create_send((handle)->next, (mem_ctx), (ev), (base_volume), (tstamp), (rw))
+
+#define SMB_VFS_SNAP_CREATE_RECV(conn, req, mem_ctx, base_path, snap_path) \
+ smb_vfs_call_snap_create_recv((conn)->vfs_handles, (req), (mem_ctx), (base_path), (snap_path))
+#define SMB_VFS_NEXT_SNAP_CREATE_RECV(handle, req, mem_ctx, base_path, snap_path) \
+ smb_vfs_call_snap_create_recv((handle)->next, (req), (mem_ctx), (base_path), (snap_path))
+
+#define SMB_VFS_SNAP_DELETE_SEND(conn, mem_ctx, ev, snap_path) \
+ smb_vfs_call_snap_delete_send((conn)->vfs_handles, (mem_ctx), (ev), (snap_path))
+#define SMB_VFS_NEXT_SNAP_DELETE_SEND(handle, mem_ctx, ev, snap_path) \
+ smb_vfs_call_snap_delete_send((handle)->next, (mem_ctx), (ev), (snap_path))
+
+#define SMB_VFS_SNAP_DELETE_RECV(conn, req) \
+ smb_vfs_call_snap_delete_recv((conn)->vfs_handles, (req))
+#define SMB_VFS_NEXT_SNAP_DELETE_RECV(handle, req) \
+ smb_vfs_call_snap_delete_recv((handle)->next, (req))
+
#define SMB_VFS_FGET_NT_ACL(fsp, security_info, mem_ctx, ppdesc) \
smb_vfs_call_fget_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info), (mem_ctx), (ppdesc))
#define SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info, mem_ctx, ppdesc) \
return NT_STATUS_OK;
}
+static NTSTATUS vfswrap_snap_check_path(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+static struct tevent_req *vfswrap_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ struct tevent_req *req;
+ uint32_t *unused;
+
+ req = tevent_req_create(mem_ctx, &unused, uint32_t);
+ if (req == NULL) {
+ return NULL;
+ }
+ tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);
+ return tevent_req_post(req, ev);
+}
+
+static NTSTATUS vfswrap_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+static struct tevent_req *vfswrap_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ struct tevent_req *req;
+ uint32_t *unused;
+
+ req = tevent_req_create(mem_ctx, &unused, uint32_t);
+ if (req == NULL) {
+ return NULL;
+ }
+ tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);
+ return tevent_req_post(req, ev);
+}
+
+static NTSTATUS vfswrap_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
/* Directory operations */
static DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
.statvfs_fn = vfswrap_statvfs,
.fs_capabilities_fn = vfswrap_fs_capabilities,
.get_dfs_referrals_fn = vfswrap_get_dfs_referrals,
+ .snap_check_path_fn = vfswrap_snap_check_path,
+ .snap_create_send_fn = vfswrap_snap_create_send,
+ .snap_create_recv_fn = vfswrap_snap_create_recv,
+ .snap_delete_send_fn = vfswrap_snap_delete_send,
+ .snap_delete_recv_fn = vfswrap_snap_delete_recv,
/* Directory operations */
SMB_VFS_OP_GET_SHADOW_COPY_DATA,
SMB_VFS_OP_STATVFS,
SMB_VFS_OP_FS_CAPABILITIES,
+ SMB_VFS_OP_SNAP_CHECK_PATH,
+ SMB_VFS_OP_SNAP_CREATE_SEND,
+ SMB_VFS_OP_SNAP_CREATE_RECV,
+ SMB_VFS_OP_SNAP_DELETE_SEND,
+ SMB_VFS_OP_SNAP_DELETE_RECV,
/* Directory operations */
{ SMB_VFS_OP_GET_SHADOW_COPY_DATA, "get_shadow_copy_data" },
{ SMB_VFS_OP_STATVFS, "statvfs" },
{ SMB_VFS_OP_FS_CAPABILITIES, "fs_capabilities" },
+ { SMB_VFS_OP_SNAP_CHECK_PATH, "snap_check_path" },
+ { SMB_VFS_OP_SNAP_CREATE_SEND, "snap_create_send" },
+ { SMB_VFS_OP_SNAP_CREATE_RECV, "snap_create_recv" },
+ { SMB_VFS_OP_SNAP_DELETE_SEND, "snap_delete_send" },
+ { SMB_VFS_OP_SNAP_DELETE_RECV, "snap_delete_recv" },
{ SMB_VFS_OP_OPENDIR, "opendir" },
{ SMB_VFS_OP_FDOPENDIR, "fdopendir" },
{ SMB_VFS_OP_READDIR, "readdir" },
return result;
}
-
static int smb_full_audit_set_quota(struct vfs_handle_struct *handle,
enum SMB_QUOTA_TYPE qtype, unid_t id,
SMB_DISK_QUOTA *qt)
return result;
}
+static NTSTATUS smb_full_audit_snap_check_path(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ NTSTATUS status;
+
+ status = SMB_VFS_NEXT_SNAP_CHECK_PATH(handle, mem_ctx, service_path,
+ base_volume);
+ do_log(SMB_VFS_OP_SNAP_CHECK_PATH, NT_STATUS_IS_OK(status),
+ handle, "");
+
+ return status;
+}
+
+static struct tevent_req *smb_full_audit_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ struct tevent_req *req;
+
+ req = SMB_VFS_NEXT_SNAP_CREATE_SEND(handle, mem_ctx, ev, base_volume,
+ tstamp, rw);
+ do_log(SMB_VFS_OP_SNAP_CREATE_SEND, req, handle, "");
+
+ return req;
+}
+
+static NTSTATUS smb_full_audit_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ NTSTATUS status;
+
+ status = SMB_VFS_NEXT_SNAP_CREATE_RECV(handle, req, mem_ctx, base_path,
+ snap_path);
+ do_log(SMB_VFS_OP_SNAP_CREATE_RECV, NT_STATUS_IS_OK(status),
+ handle, "");
+
+ return status;
+}
+
+static struct tevent_req *smb_full_audit_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ struct tevent_req *req;
+
+ req = SMB_VFS_NEXT_SNAP_DELETE_SEND(handle, mem_ctx, ev, snap_path);
+ do_log(SMB_VFS_OP_SNAP_DELETE_SEND, req, handle, "");
+
+ return req;
+}
+
+static NTSTATUS smb_full_audit_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ NTSTATUS status;
+
+ status = SMB_VFS_NEXT_SNAP_DELETE_RECV(handle, req);
+ do_log(SMB_VFS_OP_SNAP_DELETE_RECV, NT_STATUS_IS_OK(status),
+ handle, "");
+
+ return status;
+}
+
static DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
const char *fname, const char *mask, uint32 attr)
{
.get_shadow_copy_data_fn = smb_full_audit_get_shadow_copy_data,
.statvfs_fn = smb_full_audit_statvfs,
.fs_capabilities_fn = smb_full_audit_fs_capabilities,
+ .snap_check_path_fn = smb_full_audit_snap_check_path,
+ .snap_create_send_fn = smb_full_audit_snap_create_send,
+ .snap_create_recv_fn = smb_full_audit_snap_create_recv,
+ .snap_delete_send_fn = smb_full_audit_snap_delete_send,
+ .snap_delete_recv_fn = smb_full_audit_snap_delete_recv,
.opendir_fn = smb_full_audit_opendir,
.fdopendir_fn = smb_full_audit_fdopendir,
.readdir_fn = smb_full_audit_readdir,
return result;
}
+static NTSTATUS smb_time_audit_snap_check_path(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ NTSTATUS status;
+ struct timespec ts1,ts2;
+ double timediff;
+
+ clock_gettime_mono(&ts1);
+ status = SMB_VFS_NEXT_SNAP_CHECK_PATH(handle, mem_ctx, service_path,
+ base_volume);
+ clock_gettime_mono(&ts2);
+ timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
+
+ if (timediff > audit_timeout) {
+ smb_time_audit_log("snap_check_path", timediff);
+ }
+
+ return status;
+}
+
+struct time_audit_sc_state {
+ struct timespec ts_send;
+ struct vfs_handle_struct *handle;
+ char *base_path;
+ char *snap_path;
+ NTSTATUS status;
+ struct tevent_req *subreq;
+};
+static void smb_time_audit_snap_create_done(struct tevent_req *subreq);
+
+static struct tevent_req *smb_time_audit_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ struct tevent_req *req;
+ struct time_audit_sc_state *sc_state;
+
+ req = tevent_req_create(mem_ctx, &sc_state, struct time_audit_sc_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ sc_state->handle = handle;
+ sc_state->status = NT_STATUS_OK;
+ clock_gettime_mono(&sc_state->ts_send);
+ sc_state->subreq = SMB_VFS_NEXT_SNAP_CREATE_SEND(handle, sc_state, ev,
+ base_volume, tstamp,
+ rw);
+ if (tevent_req_nomem(sc_state->subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ tevent_req_set_callback(sc_state->subreq,
+ smb_time_audit_snap_create_done,
+ req);
+ return req;
+}
+
+static void smb_time_audit_snap_create_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct time_audit_sc_state *sc_state
+ = tevent_req_data(req, struct time_audit_sc_state);
+
+ sc_state->status = SMB_VFS_NEXT_SNAP_CREATE_RECV(sc_state->handle,
+ sc_state->subreq,
+ sc_state,
+ &sc_state->base_path,
+ &sc_state->snap_path);
+ if (tevent_req_nterror(req, sc_state->status)) {
+ return;
+ }
+ tevent_req_done(req);
+}
+
+static NTSTATUS smb_time_audit_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ struct time_audit_sc_state *sc_state
+ = tevent_req_data(req, struct time_audit_sc_state);
+ struct timespec ts_recv;
+ double timediff;
+
+ clock_gettime_mono(&ts_recv);
+ timediff = nsec_time_diff(&ts_recv, &sc_state->ts_send)*1.0e-9;
+ if (timediff > audit_timeout) {
+ smb_time_audit_log("snap_create", timediff);
+ }
+
+ *base_path = talloc_strdup(mem_ctx, sc_state->base_path);
+ *snap_path = talloc_strdup(mem_ctx, sc_state->snap_path);
+ return sc_state->status;
+}
+
+struct time_audit_sd_state {
+ struct timespec ts_send;
+ struct vfs_handle_struct *handle;
+ NTSTATUS status;
+ struct tevent_req *subreq;
+};
+static void smb_time_audit_snap_delete_done(struct tevent_req *subreq);
+
+static struct tevent_req *smb_time_audit_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ struct tevent_req *req;
+ struct time_audit_sd_state *sd_state;
+
+ req = tevent_req_create(mem_ctx, &sd_state, struct time_audit_sd_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ sd_state->handle = handle;
+ sd_state->status = NT_STATUS_OK;
+ clock_gettime_mono(&sd_state->ts_send);
+ sd_state->subreq = SMB_VFS_NEXT_SNAP_DELETE_SEND(handle, sd_state, ev, snap_path);
+ if (tevent_req_nomem(sd_state->subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ tevent_req_set_callback(sd_state->subreq,
+ smb_time_audit_snap_delete_done,
+ req);
+ return req;
+}
+
+static void smb_time_audit_snap_delete_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct time_audit_sd_state *sd_state
+ = tevent_req_data(req, struct time_audit_sd_state);
+
+ sd_state->status = SMB_VFS_NEXT_SNAP_DELETE_RECV(sd_state->handle,
+ sd_state->subreq);
+ if (tevent_req_nterror(req, sd_state->status)) {
+ return;
+ }
+ tevent_req_done(req);
+}
+
+static NTSTATUS smb_time_audit_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ struct time_audit_sd_state *sd_state
+ = tevent_req_data(req, struct time_audit_sd_state);
+ struct timespec ts_recv;
+ double timediff;
+
+ clock_gettime_mono(&ts_recv);
+ timediff = nsec_time_diff(&ts_recv, &sd_state->ts_send)*1.0e-9;
+ if (timediff > audit_timeout) {
+ smb_time_audit_log("snap_delete", timediff);
+ }
+
+ return sd_state->status;
+}
+
static DIR *smb_time_audit_opendir(vfs_handle_struct *handle,
- const char *fname,
- const char *mask, uint32 attr)
+ const char *fname,
+ const char *mask, uint32 attr)
{
DIR *result;
struct timespec ts1,ts2;
.get_shadow_copy_data_fn = smb_time_audit_get_shadow_copy_data,
.statvfs_fn = smb_time_audit_statvfs,
.fs_capabilities_fn = smb_time_audit_fs_capabilities,
+ .snap_check_path_fn = smb_time_audit_snap_check_path,
+ .snap_create_send_fn = smb_time_audit_snap_create_send,
+ .snap_create_recv_fn = smb_time_audit_snap_create_recv,
+ .snap_delete_send_fn = smb_time_audit_snap_delete_send,
+ .snap_delete_recv_fn = smb_time_audit_snap_delete_recv,
.opendir_fn = smb_time_audit_opendir,
.fdopendir_fn = smb_time_audit_fdopendir,
.readdir_fn = smb_time_audit_readdir,
return handle->fns->copy_chunk_recv_fn(handle, req, copied);
}
+NTSTATUS smb_vfs_call_snap_check_path(vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ const char *service_path,
+ char **base_volume)
+{
+ VFS_FIND(snap_check_path);
+ return handle->fns->snap_check_path_fn(handle, mem_ctx, service_path,
+ base_volume);
+}
+
+struct tevent_req *smb_vfs_call_snap_create_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const char *base_volume,
+ time_t *tstamp,
+ bool rw)
+{
+ VFS_FIND(snap_create_send);
+ return handle->fns->snap_create_send_fn(handle, mem_ctx, ev,
+ base_volume, tstamp, rw);
+}
+
+NTSTATUS smb_vfs_call_snap_create_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ char **base_path, char **snap_path)
+{
+ VFS_FIND(snap_create_recv);
+ return handle->fns->snap_create_recv_fn(handle, req, mem_ctx,
+ base_path, snap_path);
+}
+
+struct tevent_req *smb_vfs_call_snap_delete_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ char *snap_path)
+{
+ VFS_FIND(snap_delete_send);
+ return handle->fns->snap_delete_send_fn(handle, mem_ctx, ev, snap_path);
+}
+
+NTSTATUS smb_vfs_call_snap_delete_recv(struct vfs_handle_struct *handle,
+ struct tevent_req *req)
+{
+ VFS_FIND(snap_delete_recv);
+ return handle->fns->snap_delete_recv_fn(handle, req);
+}
+
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,