From: Mike Yuan Date: Sat, 25 Nov 2023 11:10:50 +0000 (+0800) Subject: nspawn-patch-uid: clarify that changing mode of symlink is unsupported X-Git-Tag: v255-rc4~49^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30196%2Fhead;p=thirdparty%2Fsystemd.git nspawn-patch-uid: clarify that changing mode of symlink is unsupported --- diff --git a/src/nspawn/nspawn-patch-uid.c b/src/nspawn/nspawn-patch-uid.c index 66663adc2b9..b8918a2315f 100644 --- a/src/nspawn/nspawn-patch-uid.c +++ b/src/nspawn/nspawn-patch-uid.c @@ -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);