1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

nspawn-patch-uid: clarify that changing mode of symlink is unsupported

This commit is contained in:
Mike Yuan 2023-11-25 19:10:50 +08:00
parent 677e644530
commit 0cdffada3d
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -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);