From owner-svn-src-head@freebsd.org Fri Jan 20 06:59:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B91CB95DF; Fri, 20 Jan 2017 06:59:57 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2A001BF6; Fri, 20 Jan 2017 06:59:56 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:752a:389e:e35e:c4a4:70e1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 7861B2B95A; Thu, 19 Jan 2017 22:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1484895596; x=1484909996; bh=lqhSIIk6VI7QoHintmU6A2TpILACLjVHTD3ZQCZqw54=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=p/GuRXOsXHFpkttfY7xmFZji4MhSivm4ezAkbzKjLf6HJDuPaq6IAmj5X1cbNIpGz 4xGqD17ZFm8COgnUzZ9WToDWGuu8sMCVeX5xO6RICi/k/IOlMbsC2z4EUWM2ZhZ9f+ M2b0UAD05pnLB9v4pjK0VgaYDaG+L41newks/2PE= Subject: Re: svn commit: r312404 - head/usr.bin/sed To: cem@freebsd.org, Antoine Brodin References: <201701190801.v0J81ZG9008267@repo.freebsd.org> Cc: d@delphij.net, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Xin Li Message-ID: <2e5e7d42-9faa-957f-1a63-a10b91459985@delphij.net> Date: Thu, 19 Jan 2017 22:59:52 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 06:59:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kSSRRilRWIw4ULATlBnMJ0m0iebqwGdgC Content-Type: multipart/mixed; boundary="SuRItJcO1rFLU3g36HqQDilesvQueKFIa"; protected-headers="v1" From: Xin Li To: cem@freebsd.org, Antoine Brodin Cc: d@delphij.net, src-committers , 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> In-Reply-To: --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 = wrote: >> On Thu, Jan 19, 2017 at 9:01 AM, Xin LI 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 . >>> >>> 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--