Skip to content

Commit

Permalink
nspawn-patch-uid: clarify that changing mode of symlink is unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
YHNdnzj committed Nov 25, 2023
1 parent 677e644 commit 0cdffad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nspawn/nspawn-patch-uid.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int patch_fd(int fd, const char *name, const struct stat *st, uid_t shift
if (name) {
if (!S_ISLNK(st->st_mode))
r = fchmodat(fd, name, st->st_mode, 0);
else /* AT_SYMLINK_NOFOLLOW is not available for fchmodat() */
else /* Changing the mode of a symlink is not supported by Linux kernel. Don't bother. */
r = 0;
} else
r = fchmod(fd, st->st_mode);
Expand Down

0 comments on commit 0cdffad

Please sign in to comment.