Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Jun 2015 15:52:52 -0400
From: Rich Felker <>
Subject: Re: getgrgid and errno

On Tue, Jun 09, 2015 at 09:46:50PM +0200, Julien Ramseier wrote:
> > Le 9 juin 2015 à 21:17, Alex <> 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).


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.