Skip to content

Commit

Permalink
copy_tree: use fchmodat instead of chmod
Browse files Browse the repository at this point in the history
Fixes regression introduced in faeab50
for setups configured without acl support.
  • Loading branch information
ferivoz authored and ikerexxe committed Sep 9, 2022
1 parent 23634d8 commit f3bdb28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmisc/copydir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down

0 comments on commit f3bdb28

Please sign in to comment.