Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2488EB3B-F7E2-4573-97AF-89227D67EC46@gmail.com>
Date: Tue, 9 Jun 2015 21:46:50 +0200
From: Julien Ramseier <j.ramseier@...il.com>
To: musl@...ts.openwall.com
Subject: Re: getgrgid and errno


> 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?

Julien

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.