summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2012-04-05 01:33:59 +0200
committerThomas Schwinge <thomas@schwinge.name>2012-04-05 01:33:59 +0200
commitd9825184e1f34e007ab321099fed328e9616789a (patch)
treeb087e131a7c7b1265090ed5c02a26f44f83e2961 /nscd
parent14d9e2b1fd8298da6cd388d421553d6ee8159ef7 (diff)
parent6a9c58703f282fc2491e5e67c8180f00da320ef8 (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts: configure configure.in posix/glob/configure sysdeps/i386/sysdep.h sysdeps/ia64/configure sysdeps/mach/hurd/socket.c
Diffstat (limited to 'nscd')
-rw-r--r--nscd/Makefile5
-rw-r--r--nscd/aicache.c10
-rw-r--r--nscd/cache.c3
-rw-r--r--nscd/connections.c3
-rw-r--r--nscd/dbg_log.c3
-rw-r--r--nscd/dbg_log.h5
-rw-r--r--nscd/gai.c3
-rw-r--r--nscd/getgrgid_r.c3
-rw-r--r--nscd/getgrnam_r.c3
-rw-r--r--nscd/gethstbyad_r.c3
-rw-r--r--nscd/gethstbynm3_r.c3
-rw-r--r--nscd/getpwnam_r.c3
-rw-r--r--nscd/getpwuid_r.c3
-rw-r--r--nscd/getsrvbynm_r.c3
-rw-r--r--nscd/getsrvbypt_r.c3
-rw-r--r--nscd/grpcache.c10
-rw-r--r--nscd/hstcache.c10
-rw-r--r--nscd/initgrcache.c10
-rw-r--r--nscd/mem.c10
-rw-r--r--nscd/netgroupcache.c3
-rw-r--r--nscd/nscd-client.h5
-rw-r--r--nscd/nscd.c7
-rw-r--r--nscd/nscd.h16
-rw-r--r--nscd/nscd_conf.c3
-rw-r--r--nscd/nscd_getai.c5
-rw-r--r--nscd/nscd_getgr_r.c5
-rw-r--r--nscd/nscd_gethst_r.c5
-rw-r--r--nscd/nscd_getpw_r.c5
-rw-r--r--nscd/nscd_getserv_r.c5
-rw-r--r--nscd/nscd_helper.c5
-rw-r--r--nscd/nscd_initgroups.c5
-rw-r--r--nscd/nscd_netgroup.c5
-rw-r--r--nscd/nscd_proto.h5
-rw-r--r--nscd/nscd_setup_thread.c3
-rw-r--r--nscd/nscd_stat.c5
-rw-r--r--nscd/pwdcache.c10
-rw-r--r--nscd/selinux.c5
-rw-r--r--nscd/selinux.h5
-rw-r--r--nscd/servicescache.c10
39 files changed, 89 insertions, 124 deletions
diff --git a/nscd/Makefile b/nscd/Makefile
index 284b4fc4e7..f6965dd9c6 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -12,9 +12,8 @@
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
#
# Sub-makefile for nscd portion of the library.
diff --git a/nscd/aicache.c b/nscd/aicache.c
index aaaf80df9d..a3de6368bd 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
@@ -514,8 +513,9 @@ next_nip:
if (fd != -1)
TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store the
+ result, so be it. */
+ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/cache.c b/nscd/cache.c
index 507ca78464..96ade53263 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <atomic.h>
diff --git a/nscd/connections.c b/nscd/connections.c
index 5f1c5be681..58f621b66d 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
diff --git a/nscd/dbg_log.c b/nscd/dbg_log.c
index fa99dac88f..1d1a440510 100644
--- a/nscd/dbg_log.c
+++ b/nscd/dbg_log.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <stdarg.h>
#include <stdio.h>
diff --git a/nscd/dbg_log.h b/nscd/dbg_log.h
index 6cec54cae9..057fd4fc77 100644
--- a/nscd/dbg_log.h
+++ b/nscd/dbg_log.h
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _DBG_LOG_H
#define _DBG_LOG_H 1
diff --git a/nscd/gai.c b/nscd/gai.c
index 7bea8c4294..2df7ea7487 100644
--- a/nscd/gai.c
+++ b/nscd/gai.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <kernel-features.h>
diff --git a/nscd/getgrgid_r.c b/nscd/getgrgid_r.c
index 297ebe7691..09b6cbf1cb 100644
--- a/nscd/getgrgid_r.c
+++ b/nscd/getgrgid_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <grp.h>
diff --git a/nscd/getgrnam_r.c b/nscd/getgrnam_r.c
index 55e69d0e03..53e572d13a 100644
--- a/nscd/getgrnam_r.c
+++ b/nscd/getgrnam_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <grp.h>
diff --git a/nscd/gethstbyad_r.c b/nscd/gethstbyad_r.c
index 2e7a09c2bd..bb9fab98e8 100644
--- a/nscd/gethstbyad_r.c
+++ b/nscd/gethstbyad_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <netdb.h>
diff --git a/nscd/gethstbynm3_r.c b/nscd/gethstbynm3_r.c
index a917f893b1..86038ba771 100644
--- a/nscd/gethstbynm3_r.c
+++ b/nscd/gethstbynm3_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <ctype.h>
#include <errno.h>
diff --git a/nscd/getpwnam_r.c b/nscd/getpwnam_r.c
index a1f7c3c872..7b6c5b31e3 100644
--- a/nscd/getpwnam_r.c
+++ b/nscd/getpwnam_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <pwd.h>
diff --git a/nscd/getpwuid_r.c b/nscd/getpwuid_r.c
index 501c605b5b..f3a01c64fe 100644
--- a/nscd/getpwuid_r.c
+++ b/nscd/getpwuid_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <pwd.h>
diff --git a/nscd/getsrvbynm_r.c b/nscd/getsrvbynm_r.c
index ebd344ac59..c8b3744153 100644
--- a/nscd/getsrvbynm_r.c
+++ b/nscd/getsrvbynm_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <netdb.h>
diff --git a/nscd/getsrvbypt_r.c b/nscd/getsrvbypt_r.c
index 69abee15d9..cb73426d8a 100644
--- a/nscd/getsrvbypt_r.c
+++ b/nscd/getsrvbypt_r.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <netdb.h>
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index e9607c6f11..d09badfac6 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
@@ -120,8 +119,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
else
written = total;
- /* If we cannot permanently store the result, so be it. */
- if (db->negtimeout == 0)
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 4d68ade98c..a7ecdc7e9f 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
@@ -141,8 +140,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
MSG_NOSIGNAL)) != total)
all_written = false;
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index 4ac9942aeb..255b121ddc 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
@@ -202,8 +201,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/mem.c b/nscd/mem.c
index fcea6dbd03..3811b447b0 100644
--- a/nscd/mem.c
+++ b/nscd/mem.c
@@ -1,5 +1,5 @@
/* Cache memory handling.
- Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008, 2009, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
@@ -35,11 +34,6 @@
#include "nscd.h"
-/* Wrapper functions with error checking for standard functions. */
-extern void *xmalloc (size_t n);
-extern void *xcalloc (size_t n, size_t s);
-
-
static int
sort_he (const void *p1, const void *p2)
{
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
index 1bb18d4ec5..13229f4213 100644
--- a/nscd/netgroupcache.c
+++ b/nscd/netgroupcache.c
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
index b5cd2d2c1e..e57a23c057 100644
--- a/nscd/nscd-client.h
+++ b/nscd/nscd-client.h
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* This file defines everything that client code should need to
know to talk to the nscd daemon. */
diff --git a/nscd/nscd.c b/nscd/nscd.c
index be693c9d5c..9cd7273bbf 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (c) 1998-2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* nscd - Name Service Cache Daemon. Caches passwd, group, and hosts. */
@@ -446,7 +445,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2011");
+"), "2012");
fprintf (stream, gettext ("Written by %s.\n"),
"Thorsten Kukuk and Ulrich Drepper");
}
diff --git a/nscd/nscd.h b/nscd/nscd.h
index fdaf01bfbe..86ac27855a 100644
--- a/nscd/nscd.h
+++ b/nscd/nscd.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 1998-2001, 2003-2009, 2011 Free Software Foundation, Inc.
+/* Copyright (c) 1998-2001, 2003-2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _NSCD_H
#define _NSCD_H 1
@@ -201,9 +200,12 @@ extern gid_t old_gid;
/* Prototypes for global functions. */
/* Wrapper functions with error checking for standard functions. */
-extern void *xmalloc (size_t n);
-extern void *xcalloc (size_t n, size_t s);
-extern void *xrealloc (void *o, size_t n);
+extern void *xmalloc (size_t n)
+ __attribute_malloc__ __attribute_alloc_size (1);
+extern void *xcalloc (size_t n, size_t s)
+ __attribute_malloc__ __attribute_alloc_size (1, 2);
+extern void *xrealloc (void *o, size_t n)
+ __attribute_malloc__ __attribute_alloc_size (2);
/* nscd.c */
extern void termination_handler (int signum) __attribute__ ((__noreturn__));
diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c
index 98b59280c6..07faf44a53 100644
--- a/nscd/nscd_conf.c
+++ b/nscd/nscd_conf.c
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <ctype.h>
#include <errno.h>
diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
index d1c5cd14e9..40fe3d0ef6 100644
--- a/nscd/nscd_getai.c
+++ b/nscd/nscd_getai.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index c2d204c3c8..ac3d85fc39 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 6ee142d71b..c1661f86d4 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <resolv.h>
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index 8a4449d186..409b672ee0 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
index 3b7dc4b620..ff85d8299f 100644
--- a/nscd/nscd_getserv_r.c
+++ b/nscd/nscd_getserv_r.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 365b599892..92558b6a51 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c
index 5ff60c080c..921a795b49 100644
--- a/nscd/nscd_initgroups.c
+++ b/nscd/nscd_initgroups.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
diff --git a/nscd/nscd_netgroup.c b/nscd/nscd_netgroup.c
index 8457cec9d3..8f6925eca1 100644
--- a/nscd/nscd_netgroup.c
+++ b/nscd/nscd_netgroup.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <errno.h>
diff --git a/nscd/nscd_proto.h b/nscd/nscd_proto.h
index 742c154fac..25a69dac6d 100644
--- a/nscd/nscd_proto.h
+++ b/nscd/nscd_proto.h
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _NSCD_PROTO_H
#define _NSCD_PROTO_H 1
diff --git a/nscd/nscd_setup_thread.c b/nscd/nscd_setup_thread.c
index 4b6671e300..d4fd27bf60 100644
--- a/nscd/nscd_setup_thread.c
+++ b/nscd/nscd_setup_thread.c
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <nscd.h>
diff --git a/nscd/nscd_stat.c b/nscd/nscd_stat.c
index 658fd56fa3..cbc865d632 100644
--- a/nscd/nscd_stat.c
+++ b/nscd/nscd_stat.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <error.h>
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 49e130c1f0..a8ea407aa0 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -1,5 +1,5 @@
/* Cache handling for passwd lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
@@ -124,8 +123,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/selinux.c b/nscd/selinux.c
index f618640dd6..18b95730bd 100644
--- a/nscd/selinux.c
+++ b/nscd/selinux.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "config.h"
#include <error.h>
diff --git a/nscd/selinux.h b/nscd/selinux.h
index bc7e1e287a..596b954d2f 100644
--- a/nscd/selinux.h
+++ b/nscd/selinux.h
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _SELINUX_H
#define _SELINUX_H 1
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index d3d5dce44e..0e7520de24 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <alloca.h>
#include <assert.h>
@@ -108,8 +107,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)