copy_tree: use fchmodat instead of chmod

Fixes regression introduced in faeab50e71
for setups configured without acl support.
This commit is contained in:
Samanta Navarro 2022-09-04 11:54:19 +00:00 committed by Iker Pedrosa
parent 23634d8de7
commit f3bdb28e57

View File

@ -529,7 +529,7 @@ static int copy_dir (const struct path_info *src, const struct path_info *dst,
|| ( (perm_copy_path (src, dst, &ctx) != 0)
&& (errno != 0))
#else /* !WITH_ACL */
|| (chmod (dst, statp->st_mode) != 0)
|| (fchmodat (dst->dirfd, dst->name, statp->st_mode & 07777, AT_SYMLINK_NOFOLLOW) != 0)
#endif /* !WITH_ACL */
#ifdef WITH_ATTR
/*