From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13625 Path: news.gmane.org!.POSTED!not-for-mail From: "A. Wilcox" Newsgroups: gmane.linux.lib.musl.general Subject: Re: function: fgetspent_r Date: Sun, 20 Jan 2019 15:12:59 -0600 Organization: =?UTF-8?Q?Ad=c3=a9lie_Linux?= Message-ID: <0ab4cefc-b617-2a1d-aa6f-5aed2257a0f7@adelielinux.org> References: <4ac5ac1b-217f-442f-fc35-bfbf015287bb@adelielinux.org> <20190116205046.GK23599@brightrain.aerifal.cx> <20190116234410.GL23599@brightrain.aerifal.cx> <20190117053147.GH29911@voyager> <20190117153830.GN23599@brightrain.aerifal.cx> <20190118203725.GI29911@voyager> <20190120154154.GA23924@voyager> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pEay8bsLfGShGZ0adXLo5H3ckKSpsfCs9" X-Trace: ciao.gmane.org 1548018785 36016 195.159.176.228 (20 Jan 2019 21:13:05 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2019 21:13:05 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: musl@lists.openwall.com Original-X-From: musl-return-13641-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 20 22:13:01 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by ciao.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1glKOq-0009Fw-Fy for gllmg-musl@m.gmane.org; Sun, 20 Jan 2019 22:13:00 +0100 Original-Received: (qmail 11500 invoked by uid 550); 20 Jan 2019 21:13:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11477 invoked from network); 20 Jan 2019 21:13:06 -0000 Openpgp: preference=signencrypt In-Reply-To: <20190120154154.GA23924@voyager> Xref: news.gmane.org gmane.linux.lib.musl.general:13625 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pEay8bsLfGShGZ0adXLo5H3ckKSpsfCs9 Content-Type: multipart/mixed; boundary="jwJsTpge5OLZGsCNG1WwVBtESjA2KZGJk"; protected-headers="v1" From: "A. Wilcox" To: musl@lists.openwall.com Message-ID: <0ab4cefc-b617-2a1d-aa6f-5aed2257a0f7@adelielinux.org> Subject: Re: [musl] function: fgetspent_r References: <4ac5ac1b-217f-442f-fc35-bfbf015287bb@adelielinux.org> <20190116205046.GK23599@brightrain.aerifal.cx> <20190116234410.GL23599@brightrain.aerifal.cx> <20190117053147.GH29911@voyager> <20190117153830.GN23599@brightrain.aerifal.cx> <20190118203725.GI29911@voyager> <20190120154154.GA23924@voyager> In-Reply-To: <20190120154154.GA23924@voyager> --jwJsTpge5OLZGsCNG1WwVBtESjA2KZGJk Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 01/20/19 09:41, Markus Wichmann wrote: > Hi all, >=20 > so, I wrote a version of fgetspent_r() now. I based it on fgetspent(). > For style, I adopted the Linux style -- might need to refactor that. > Returning EILSEQ on format error is a hack, but I found no better code.= > As I said, glibc loops on error, but we do that for no other src/passwd= > function, so we should either not start now or add that feature to ever= y > other function. >=20 > One thing I noticed: If AccountService requires this interfaces, is it > possible that it doesn't support TCB shadow files? >=20 > Ciao, > Markus It doesn't support TCB shadow files. > +int fgetspent_r(FILE *f, struct spwd* sp, char *line, size_t size, struct spwd **spret) Tiny style nit: I think the * is meant to be kept with 'sp', not 'spwd', in the second argument. Thank you so much for this! I will test this patch out ASAP and report how well it works. Best, --arw --=20 A. Wilcox (awilfox) Project Lead, Ad=E9lie Linux https://www.adelielinux.org --jwJsTpge5OLZGsCNG1WwVBtESjA2KZGJk-- --pEay8bsLfGShGZ0adXLo5H3ckKSpsfCs9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjNyWOYPU1SaTSMHHyynLUZIrnRQFAlxE5FsACgkQyynLUZIr nRTAAxAA0wF3wnyPzeUCP5Gl4BnUBj9YmHNGgrw/nQsPDnONbBnEoudTlMXvnmM4 f4MaexBtILIiAsJdYdbIVQ+/7U3hp+jf3IjDZXO7XM5ECvcI1UFhAo0N6LcTRyAw 5Ez/G2XxzBBDaW3hgHx4J2dgtjR6RaL/oa6reTeI8Xpx5AqnxrWVmAzJDqW6ypCI 6kohXsJ8V8JLnUpse2XmvRz7OVyFdCZYmujui86Og/oRozhGCKuIGQrDcdv7q5f5 wxjbZF4zPVEeZ0yZc18ttGIyIjSe3xcYB+qc7f0rW9HLtIdc+v6BnULXEDJHD4Cv NXIFahCwXtLyT5flGpIscdTyW17vzVuy7S4JUAv7tydyPuQsA0nR3g8Ye+e1CI9X cLpW3S3KViRNkR2KXLWC8NrD/5ewrBFs0CyF03eFI9+GgZowhqPJs1Xx+Fgdvt3p F+sopTqy3rGuew8KnbGw8fAbfK3rANP6gMeMdMr/s2bcmPiIXjjUeXUfxvhxudKs /IHET8bsgb959a3UKv/EzfBXlpuZdc/sWWPidiZ2L29fYXrQnfBcvAlTWEr8d2Ha g7pJwmo8/XCigeG3nmdR6a3aqYoTEd1CAvGnmuheLfCJxHbgW5kVcXyQwZeYW0Ti KmJ3CqIoKr9QMhtsrVe695rBayg74Kyu6ndD/PJlQX7o+izWzCc= =n7j5 -----END PGP SIGNATURE----- --pEay8bsLfGShGZ0adXLo5H3ckKSpsfCs9--