|
Message-ID: <20150609213850.GQ17573@brightrain.aerifal.cx> Date: Tue, 9 Jun 2015 17:38:51 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: getgrgid and errno On Tue, Jun 09, 2015 at 03:52:52PM -0400, Rich Felker wrote: > On Tue, Jun 09, 2015 at 09:46:50PM +0200, Julien Ramseier wrote: > > > > > Le 9 juin 2015 à 21:17, Alex <alexinbeijing@...il.com> a écrit : > > > > > > The code which you show says "if (rv) errno = rv". The debugger shows that rv is 0. So the condition is false and errno is not set. > > > > > > It must have been set to ENOENT somewhere above that -- as you single-step through the code, keep printing errno on each line to find out where. > > > > Thanks. I don’t know how I missed that. > > > > errno is set to ENOENT by __nscd_query, since no nscd daemon is running and /var/run/nscd/socket does not exist. > > So getgrgid always sets errno when the group doesn’t exist and no nscd daemon is available. > > Is that expected? > > No, it's a bug/oversight. There should be a fix in git master soon > (and it should safely apply to recent releases if you prefer). Fixed in commit bd1eaceaa3975bd2a2a34e211cff896affaecadf. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.