From: Ralph Boehme Date: Mon, 14 Dec 2020 14:53:33 +0000 (+0100) Subject: vfs_shadow_copy2: support real dirfsps in shadow_copy2_mkdirat() X-Git-Tag: samba-4.14.0rc1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6f35e89d004405f80d0d8d8f7d0e6a67e14cd3d;p=thirdparty%2Fsamba.git vfs_shadow_copy2: support real dirfsps in shadow_copy2_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 6e4ed606309..227ac148260 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -2194,15 +2194,25 @@ static int shadow_copy2_mkdirat(vfs_handle_struct *handle, const struct smb_filename *smb_fname, mode_t mode) { + struct smb_filename *full_fname = NULL; time_t timestamp = 0; + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + errno = ENOMEM; + return -1; + } + if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, - smb_fname, + full_fname, ×tamp, NULL)) { return -1; } + TALLOC_FREE(full_fname); if (timestamp != 0) { errno = EROFS; return -1;