bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: actual bug found (I think) in gethostbyname_r() ?


From: Thorsten Kukuk
Subject: Re: actual bug found (I think) in gethostbyname_r() ?
Date: Sat, 28 Oct 2000 17:27:03 +0200
User-agent: Mutt/1.2.5i

On Sat, Oct 28, Greg Herlein wrote:

> I suspect I see the problem referenced below in the file
> getXXent_r.c in the glibc nss directory:
> 
> The very end of the function:
> 
> int
> INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer,
> size_t buflen,
>                             LOOKUP_TYPE **result H_ERRNO_PARM)
> {
> 
>   <SNIP>
> 
>   __libc_lock_unlock (lock);
> 
>   *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
>   return status == NSS_STATUS_SUCCESS ? 0 : errno;
> }
> 
> The last line is the problem.  It checks if the status is
> NSS_STATUS_SUCCESS and if it is it is hardcoded to return a 0 -
> which in effect is returning NSS_STATUS_NOTFOUND.

No, returning a 0 means: Success is signalled.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/       address@hidden
SuSE GmbH            Schanzaeckerstr. 10            90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]