On 13/02/2020 18:42, Paul Eggert wrote:
Problem reported by Florian Weimer in:
https://www.sourceware.org/ml/libc-alpha/2020-02/msg00534.html

A very similar "ENOTSUP" problem is being reported with coreutils-8.32
with `mknod -m 666 /dev/random c 1 8` when trying to build Fedora rawhide in a 
chroot.
https://bugzilla.redhat.com/1811038

BTW I see a possible small issue in lchmod.c in this code:

+  if (chmod_errno != ENOENT)
+    {
+      errno = chmod_errno;
+      return chmod_result;
+    }

Shouldn't that also check for other lookup errors like ENOTDIR and ELOOP ?

Also mknod() in coreutils is calling lchmod().
Shouldn't it be just calling chmod() as if mknod() was passed a
symlink, then it would have already failed with EEXIST?

cheers,
Pádraig

Reply via email to