mirror of
https://github.com/samba-team/samba.git
synced 2025-08-30 17:49:30 +03:00
VFS: shadow_copy2: Fixup shadow_copy2_mknodat() to correctly use the dirfsp path.
Missed in my original fixes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
@ -1625,13 +1625,23 @@ static int shadow_copy2_mknodat(vfs_handle_struct *handle,
|
|||||||
mode_t mode,
|
mode_t mode,
|
||||||
SMB_DEV_T dev)
|
SMB_DEV_T dev)
|
||||||
{
|
{
|
||||||
|
struct smb_filename *full_fname = NULL;
|
||||||
time_t timestamp = 0;
|
time_t timestamp = 0;
|
||||||
|
|
||||||
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle,
|
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
|
||||||
smb_fname,
|
dirfsp,
|
||||||
×tamp, NULL)) {
|
smb_fname);
|
||||||
|
if (full_fname == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle,
|
||||||
|
full_fname,
|
||||||
|
×tamp, NULL)) {
|
||||||
|
TALLOC_FREE(full_fname);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
TALLOC_FREE(full_fname);
|
||||||
if (timestamp != 0) {
|
if (timestamp != 0) {
|
||||||
errno = EROFS;
|
errno = EROFS;
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user