|
Message-ID: <55DE3781.9000109@skarnet.org> Date: Thu, 27 Aug 2015 00:02:41 +0200 From: Laurent Bercot <ska-dietlibc@...rnet.org> To: musl@...ts.openwall.com Subject: Re: lchmod on Linux On 26/08/2015 23:09, Tomasz Sterna wrote: > One thing could be always returning 0, as this is really a no-op on > Linux. I tend to agree with that. https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2 does not describe EOPNOTSUPP as a possible error code. Is there a reason not to make lchmod return 0 when the underlying fchmodat returns -1 EOPNOTSUPP? >> EOPNOTSUP is a documented result for fchmodat, [...] > Is it a documented result for lchmod? (Google is no help here.) Not according to the FreeBSD doc. The thing is, lchmod() is not POSIX, it's only BSD (I could find doc for FreeBSD and MacOS X); the best behaviour is not to use it at all. What libarchive should really do is to replace lchmod() with fchmodat() and explicitly test for EOPNOTSUPP. -- Laurent
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.