const struct smb_filename *smb_fname,
struct smb_file_time *ft)
{
- time_t timestamp;
- char *stripped;
- int ret, saved_errno;
- struct smb_filename *conv;
+ time_t timestamp = 0;
if (!snapper_gmt_strip_snapshot(talloc_tos(), handle,
smb_fname->base_name,
- ×tamp, &stripped)) {
- return -1;
- }
- if (timestamp == 0) {
- return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
- }
- conv = cp_smb_filename(talloc_tos(), smb_fname);
- if (conv == NULL) {
- errno = ENOMEM;
+ ×tamp, NULL)) {
return -1;
}
- conv->base_name = snapper_gmt_convert(conv, handle,
- stripped, timestamp);
- TALLOC_FREE(stripped);
- if (conv->base_name == NULL) {
+ if (timestamp != 0) {
+ errno = EROFS;
return -1;
}
- ret = SMB_VFS_NEXT_NTIMES(handle, conv, ft);
- saved_errno = errno;
- TALLOC_FREE(conv);
- errno = saved_errno;
- return ret;
+ return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
}
static int snapper_gmt_readlink(vfs_handle_struct *handle,