X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id 67A56F84ED7 for ; Thu, 14 Mar 2019 15:07:39 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 3627E9E1E08; Thu, 14 Mar 2019 15:07:39 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 907D09E00FA; Thu, 14 Mar 2019 15:07:38 +0000 (UTC) Date: Thu, 14 Mar 2019 16:07:28 +0100 From: Natanael Copa To: "A. Wilcox" Cc: alpine-dev Subject: Re: [alpine-devel] APK Tools does not ensure fchmodat/fchownat succeed Message-ID: <20190314160728.00fdd9b5@ncopa-desktop.copa.dup.pw> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/inZCa+Ytgp79nNJhNHzbRlN"; protocol="application/pgp-signature" --Sig_/inZCa+Ytgp79nNJhNHzbRlN Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 20 Feb 2019 12:18:57 -0600 "A. Wilcox" wrote: > update_permissions in src/database.c does not check the return value of > fchmodat nor fchownat. There are a number of reasons it could fail: >=20 > - EIO, disk I/O error >=20 > - ENOMEM, memory was exhausted while apk was running >=20 > - others, though they are much more theoretical (abuild-apk shim hitting > EPERM, a bad package causing ELOOP, a filesystem corruption causing the > FS to go R/O while apk is running causing EROFS) >=20 > This also causes a build failure when building on glibc (because glibc > marks these functions as having return values that cannot be ignored). >=20 > I think it would be a good idea to ensure these calls succeed and set > the package as having an error if it isn't (so that a reinstallation can > be attempted). But I don't know if there is a reason they are ignored. >=20 > I also am not familiar enough with apk-tools to be confident in the > proper way to set error (don't even know if ipkg is accessible from > update_permissions which seems like the main way an error is set). I think this is something we should fix. Can you please create an issue on bugs.alpinelinux.org, and maybe send a proposal for a patch (if you have any). I suspect it will be easier to give feedback on a patch. > Thanks, > --arw >=20 --Sig_/inZCa+Ytgp79nNJhNHzbRlN Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEBILYQCL1LfHE581DKTrNCQfZSVoFAlyKbjAACgkQKTrNCQfZ SVqrCA/9Gr8LVEn7shB66qILBIBanNhqlXLDWzSmH9nZFl52NnMjW6K20SMRn3U2 yGq+P3jcAF/UpmVhZWycJML3P6uG79rTwKWLQXPH94v3xCNrX2FKEoTosGXO4/Uk eW58qPHkYcZg4jMDXBEI7MZdzm6EWTFtZTb7kSvyTfpSgIJVfhoFWk6ivnGV5QxF YaRGsylNIqieqS9hkb6cS+vbDp2JlVNpirVb1pU6jD2q8VJ2GS+VXqHE65H0KxKh oV4kMe5t0ndJo0TKu/cvnxmJ+JLWhjU7R13utgQYkqkmZjCyNq+YQV3m6KK+oUlQ Es54Gx7JrI/aGi6dflvdtfVf9KETMSrAh83OKfNfP9fs8u/SLoIKCB5tHaPlVrT1 ddjbQYd9xAgdQhge+DFpC7v/1PZ7zlNPQBEEZD7zYRv/AczFK9DHgYR1xzcRLjhp 8VS53iBAFjh+FlzqnnU4/r+dvD6eLhOkVWhSHbZ5cCvE0hCnigC1TgQjGr01kxwt ORiks2Bw6po1zg1irIQUTO3dRTRmwjjklaxPsoUjiKJyK+jifr7+fqZ/hhyvXFEv bHcnUOToLoUy7RmKc8x+CZcYipl51X/E/mu9TR9yDolYLi21TRl9RzLshj38aNSV uct6bXLXVbuTYFu6rgVsMezj58wshjkfzvxxSbMP+qOJBdFg8NY= =v66D -----END PGP SIGNATURE----- --Sig_/inZCa+Ytgp79nNJhNHzbRlN-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---