Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2017 22:59:52 -0800
From:      Xin Li <delphij@delphij.net>
To:        cem@freebsd.org, Antoine Brodin <antoine@freebsd.org>
Cc:        d@delphij.net, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r312404 - head/usr.bin/sed
Message-ID:  <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net>
In-Reply-To: <CAG6CVpUZL13ujKcOjsDfcgg7wNztRK5OHH7BQADAkN_hD-d2pQ@mail.gmail.com>
References:  <201701190801.v0J81ZG9008267@repo.freebsd.org> <CAALwa8neni57SPZAo4jW8wKu-Up0-M=weR31WtndzXdW2_jKmQ@mail.gmail.com> <CAG6CVpUZL13ujKcOjsDfcgg7wNztRK5OHH7BQADAkN_hD-d2pQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC
Content-Type: multipart/mixed; boundary="SuRItJcO1rFLU3g36HqQDilesvQueKFIa";
 protected-headers="v1"
From: Xin Li <delphij@delphij.net>
To: cem@freebsd.org, Antoine Brodin <antoine@freebsd.org>
Cc: d@delphij.net, src-committers <src-committers@freebsd.org>,
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Message-ID: <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net>
Subject: Re: svn commit: r312404 - head/usr.bin/sed
References: <201701190801.v0J81ZG9008267@repo.freebsd.org>
 <CAALwa8neni57SPZAo4jW8wKu-Up0-M=weR31WtndzXdW2_jKmQ@mail.gmail.com>
 <CAG6CVpUZL13ujKcOjsDfcgg7wNztRK5OHH7BQADAkN_hD-d2pQ@mail.gmail.com>
In-Reply-To: <CAG6CVpUZL13ujKcOjsDfcgg7wNztRK5OHH7BQADAkN_hD-d2pQ@mail.gmail.com>

--SuRItJcO1rFLU3g36HqQDilesvQueKFIa
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable



On 1/19/17 22:36, Conrad Meyer wrote:
> On Thu, Jan 19, 2017 at 10:29 PM, Antoine Brodin <antoine@freebsd.org> =
wrote:
>> On Thu, Jan 19, 2017 at 9:01 AM, Xin LI <delphij@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.
>=20
> That is clearly the intent of the code in question.  It was a bug that
> it worked before =E2=80=94 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,


--SuRItJcO1rFLU3g36HqQDilesvQueKFIa--

--kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYgbVrAAoJEJW2GBstM+ns1wcP/05NpskWm7rBiOOdvcEctDCF
OGTyzt7N6YyAP5lka78MmpVOxAs+u1roAgRO64tre7QSFr7JcWSTkgDTiO+BmIew
EF89DKO/NCOAoPmXX/LONZd3X8h4zbMPLx4M4MgxTBwwuMQlXRe104NXcuX+7wWf
OSwE5EF/jwgO7iPjtaUZz5rNxqa8VYysLZdqhZJKPpW2qZyI1O4BXMi1hs5lK2ZG
7BtxN6n3qbmGY4Nnlh4r6EKPne1bBZg0/GPfjR1AaYGsszXYAPBYtc3wfcX+ODvj
2Zo5i0bmAWZKMYlS9vzROIQw6kmVBXVccvMbIn5eWblPDx48HhT7hLw7jkALySIR
swjYq+1WVOlgdk64nDCFQr0PHFPeX8CU6V3b+nHj+XTlQvp/IVu2VkOvd9UVf1/d
E27MI3XyxIZ4Iv7P54vOQ+oxa5KbsAV7nun7p9R1kTGKytJtnabKKpSCLLFswnPZ
Gz8RHk1puA+2z4Ydc+uQWMDGpX+WDn6UH6MVqsAmA3V8ZtcNj+T+UsO0qjtoRKUy
DpZW87nPMlSyykY0f9ZGGPCmpOjJURfsJApVP+0QOHgAhCh4OVIalIGOoQ8itKgG
Iytf5l5z2KFb6ThQmfqelsFLFKhOeTc9EG1h9Tu7ICmET7WJ4BmBWwiiZA42z4OH
PUMLXry6+fFEvkTg2R+P
=oPGP
-----END PGP SIGNATURE-----

--kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2e5e7d42-9faa-957f-1a63-a10b91459985>