public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Patch for nss_nis.so
@ 2004-03-29 20:04 Thorsten Kukuk
  2004-03-29 23:11 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kukuk @ 2004-03-29 20:04 UTC (permalink / raw)
  To: libc-hacker


Hi,

there is one place in the nss nis module, where errno is set if the
group does not exist. Since we never never set errno in this case in
all other modules (and all other places in nss_nis), I propose the
following patch:

2004-03-26  Thorsten Kukuk  <kukuk@suse.de>

	* nis/nss_nis/nis-grp.c (_nss_nis_getgrnam_r): Don't
	set errno if group does not exist.

--- nis/nss_nis/nis-grp.c	19 Jan 2003 19:06:07 -0000	1.18
+++ nis/nss_nis/nis-grp.c	26 Mar 2004 21:48:41 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2001-2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.

@@ -168,9 +168,7 @@

   if (retval != NSS_STATUS_SUCCESS)
     {
-      if (retval == NSS_STATUS_NOTFOUND)
-	*errnop = EAGAIN;
-      else if (retval == NSS_STATUS_TRYAGAIN)
+      if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Maxfeldstr. 5                 D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch for nss_nis.so
  2004-03-29 20:04 Patch for nss_nis.so Thorsten Kukuk
@ 2004-03-29 23:11 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-03-29 23:11 UTC (permalink / raw)
  To: Thorsten Kukuk; +Cc: libc-hacker

Thorsten Kukuk wrote:

> 	* nis/nss_nis/nis-grp.c (_nss_nis_getgrnam_r): Don't
> 	set errno if group does not exist.

Looks OK, I've applied it.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-29 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 20:04 Patch for nss_nis.so Thorsten Kukuk
2004-03-29 23:11 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).