#include "smbd/smbd.h"
#include "lib/util/tevent_ntstatus.h"
-/* include common @GMT token filter code */
-#include "vfs_gmt_tok_common.c"
-
#define SNAPPER_SIG_LIST_SNAPS_RSP "a(uqutussa{ss})"
#define SNAPPER_SIG_LIST_CONFS_RSP "a(ssa{ss})"
#define SNAPPER_SIG_CREATE_SNAP_RSP "u"
return status;
}
-/* callout for vfs_gmt_tok_common.c */
-static char *gmt_tok_insert_string(TALLOC_CTX *mem_ctx,
- struct vfs_handle_struct *handle,
- time_t snap_time)
+static NTSTATUS snapper_snap_dir_expand(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ time_t snap_time,
+ char **snap_dir_out)
{
DBusConnection *dconn;
NTSTATUS status;
talloc_free(conf_name);
talloc_free(base_path);
dbus_connection_unref(dconn);
+ *snap_dir_out = snap_path_nobase;
- return snap_path_nobase;
+ return NT_STATUS_OK;
err_snap_path_free:
talloc_free(snap_path);
err_conn_free:
dbus_connection_unref(dconn);
err_out:
- return NULL;
+ return status;
}
static struct vfs_fn_pointers snapper_fns = {
.snap_delete_send_fn = snapper_snap_delete_send,
.snap_delete_recv_fn = snapper_snap_delete_recv,
.get_shadow_copy_data_fn = snapper_get_shadow_copy_data,
- /* use common @GMT token wrapper fns */
- .opendir_fn = gmt_tok_opendir,
- .rename_fn = gmt_tok_rename,
- .link_fn = gmt_tok_link,
- .symlink_fn = gmt_tok_symlink,
- .stat_fn = gmt_tok_stat,
- .lstat_fn = gmt_tok_lstat,
- .fstat_fn = gmt_tok_fstat,
- .open_fn = gmt_tok_open,
- .unlink_fn = gmt_tok_unlink,
- .chmod_fn = gmt_tok_chmod,
- .chown_fn = gmt_tok_chown,
- .chdir_fn = gmt_tok_chdir,
- .ntimes_fn = gmt_tok_ntimes,
- .readlink_fn = gmt_tok_readlink,
- .mknod_fn = gmt_tok_mknod,
- .realpath_fn = gmt_tok_realpath,
- .get_nt_acl_fn = gmt_tok_get_nt_acl,
- .fget_nt_acl_fn = gmt_tok_fget_nt_acl,
- .mkdir_fn = gmt_tok_mkdir,
- .rmdir_fn = gmt_tok_rmdir,
- .getxattr_fn = gmt_tok_getxattr,
- .listxattr_fn = gmt_tok_listxattr,
- .removexattr_fn = gmt_tok_removexattr,
- .setxattr_fn = gmt_tok_setxattr,
- .chmod_acl_fn = gmt_tok_chmod_acl,
- .chflags_fn = gmt_tok_chflags,
- .get_real_filename_fn = gmt_tok_get_real_filename,
+ .snap_dir_expand_fn = snapper_snap_dir_expand,
};
NTSTATUS vfs_snapper_init(void);