SMB_DEV_T dev)
{
time_t timestamp = 0;
- char *stripped = NULL;
- int saved_errno = 0;
- int ret;
- struct smb_filename *conv = NULL;
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle,
smb_fname->base_name,
- ×tamp, &stripped)) {
- return -1;
- }
- if (timestamp == 0) {
- return SMB_VFS_NEXT_MKNOD(handle, smb_fname, mode, dev);
- }
- conv = cp_smb_filename(talloc_tos(), smb_fname);
- if (conv == NULL) {
- errno = ENOMEM;
+ ×tamp, NULL)) {
return -1;
}
- conv->base_name = shadow_copy2_convert(
- conv, handle, stripped, timestamp);
- TALLOC_FREE(stripped);
- if (conv->base_name == NULL) {
+ if (timestamp != 0) {
+ errno = EROFS;
return -1;
}
- ret = SMB_VFS_NEXT_MKNOD(handle, conv, mode, dev);
- if (ret == -1) {
- saved_errno = errno;
- }
- TALLOC_FREE(conv);
- if (saved_errno != 0) {
- errno = saved_errno;
- }
- return ret;
+ return SMB_VFS_NEXT_MKNOD(handle, smb_fname, mode, dev);
}
static struct smb_filename *shadow_copy2_realpath(vfs_handle_struct *handle,