static bool snapper_gmt_strip_snapshot(TALLOC_CTX *mem_ctx,
struct vfs_handle_struct *handle,
- const char *name,
+ const struct smb_filename *smb_fname,
time_t *ptimestamp,
char **pstripped)
{
+ char *name = smb_fname->base_name;
struct tm tm;
time_t timestamp;
const char *p;
time_t timestamp_src, timestamp_dst;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname_src->base_name,
+ smb_fname_src,
×tamp_src, NULL)) {
return -1;
}
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname_dst->base_name,
+ smb_fname_dst,
×tamp_dst, NULL)) {
return -1;
}
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- link_contents->base_name,
+ link_contents,
×tamp_old,
NULL)) {
return -1;
}
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- new_smb_fname->base_name,
+ new_smb_fname,
×tamp_new,
NULL)) {
return -1;
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- old_smb_fname->base_name,
+ old_smb_fname,
×tamp_old,
NULL)) {
return -1;
}
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- new_smb_fname->base_name,
+ new_smb_fname,
×tamp_new,
NULL)) {
return -1;
int ret, saved_errno;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, &stripped)) {
return -1;
}
int ret, saved_errno;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, &stripped)) {
return -1;
}
int ret, saved_errno;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, &stripped)) {
return -1;
}
time_t timestamp = 0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, NULL)) {
return -1;
}
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
NULL)) {
return -1;
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
&stripped)) {
return -1;
time_t timestamp = 0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, NULL)) {
return -1;
}
struct smb_filename *conv = NULL;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, &stripped)) {
return -1;
}
time_t timestamp = (time_t)0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, NULL)) {
return -1;
}
int saved_errno = 0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name,
+ smb_fname,
×tamp, &stripped)) {
goto done;
}
char *conv;
struct smb_filename *smb_fname = NULL;
- if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, fname->base_name,
+ if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, fname,
×tamp, &stripped)) {
return map_nt_error_from_unix(errno);
}
{
time_t timestamp = 0;
- if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, fname->base_name,
+ if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, fname,
×tamp, NULL)) {
return -1;
}
time_t timestamp = 0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name, ×tamp, NULL)) {
+ smb_fname, ×tamp, NULL)) {
return -1;
}
if (timestamp != 0) {
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
&stripped)) {
return -1;
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
&stripped)) {
return -1;
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
NULL)) {
return -1;
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
NULL)) {
return -1;
TALLOC_CTX *mem_ctx,
char **found_name)
{
- char *path = fpath->base_name;
time_t timestamp;
char *stripped;
ssize_t ret;
char *conv;
struct smb_filename conv_fname;
- if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, path,
+ if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, fpath,
×tamp, &stripped)) {
return -1;
}
struct smb_filename *conv_smb_fname = NULL;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name, ×tamp, &stripped)) {
+ smb_fname, ×tamp, &stripped)) {
return (uint64_t)-1;
}
if (timestamp == 0) {
struct smb_filename *conv_smb_fname = NULL;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
- smb_fname->base_name, ×tamp, &stripped)) {
+ smb_fname, ×tamp, &stripped)) {
return -1;
}
if (timestamp == 0) {
if (!snapper_gmt_strip_snapshot(talloc_tos(),
handle,
- smb_fname->base_name,
+ smb_fname,
×tamp,
NULL)) {
return NT_STATUS_NO_MEMORY;