svn commit: r312404 - head/usr.bin/sed
Xin Li
delphij at delphij.net
Fri Jan 20 06:59:57 UTC 2017
On 1/19/17 22:36, Conrad Meyer wrote:
> On Thu, Jan 19, 2017 at 10:29 PM, Antoine Brodin <antoine at freebsd.org> wrote:
>> On Thu, Jan 19, 2017 at 9:01 AM, Xin LI <delphij at freebsd.org> wrote:
>>> Author: delphij
>>> Date: Thu Jan 19 08:01:35 2017
>>> New Revision: 312404
>>> URL: https://svnweb.freebsd.org/changeset/base/312404
>>>
>>> Log:
>>> Use S_ISREG instead of manual & (also it's better to compare the
>>> result from & and the pattern instead of just assuming it's one bit
>>> value).
>>>
>>> Pointed out by Tianjie Mao <tjmao tjmao com>.
>>>
>>> MFC after: 2 weeks
>>> Differential Revision: https://reviews.freebsd.org/D4827
>>
>> Hi,
>>
>> sed -i no longer works on symlinks which breaks lots of ports.
>> Please revert and request an exp-run.
>
> That is clearly the intent of the code in question. It was a bug that
> it worked before — S_IFLNK and S_IFSOCK just happen to have the
> S_IFREG bit set. It seems like either such ports should be fixed to
> dereference the link manually, or the check should be removed
> entirely.
There are other issues with previous behavior, for instance, the file
would inherit permissions from the symlink itself, while a more sensible
behavior would be to use the permissions on the symlink target.
But I think it's reasonable to revert for now and do a exp-run so we
know what would be broken. Personally I have been running with this for
a year and that made me thought it's safe :)
Cheers,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20170119/f7e368af/attachment.sig>
More information about the svn-src-head
mailing list