|
Message-ID: <20150826194932.GQ32742@brightrain.aerifal.cx> Date: Wed, 26 Aug 2015 15:49:32 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: lchmod on Linux On Wed, Aug 26, 2015 at 09:12:30PM +0200, Tomasz Sterna wrote: > I think there is an issue with musl providing lchmod() implementation > on Linux. > > It simply proxies to fchmodat(), but as you cannot change mod for > symlink on Linux it fails. > > This gives trouble to libarchive's bsdtar implementation that detects > that platform provides lchmod, tries to use it while extracting > archives containing symlinks and fails... ;-( > > For now I am just patching libarchive config.h to not use lchmod, but I > would rather see musl do the right thing. :-) This issue (the useless lchmod) was raised once before, a long time ago. But there's not really anything that can be done about it since there are existing binaries referencing it. But conceptually, the same issue would exist if libarchive were using the fchmodat function rather than lchmod. So it seems to me that the problem is not the existence of an operation that always-fails, but rather libarchive's misinterpretation of the result. EOPNOTSUP is a documented result for fchmodat, and generally programs should not treat it as an error but should just ignore it. The same should probably be done for lchmod. Rich
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.