diff options
author | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
commit | 833861be818bb5d45ab0c47370b84068dfb2fedf (patch) | |
tree | 2f1754a415c378f6b067f9158cc42df24d4641d2 /nscd | |
parent | c397a0064061e28a00eea873669e59f3983db791 (diff) |
import later fedora-branch tweaks
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/Makefile | 6 | ||||
-rw-r--r-- | nscd/connections.c | 7 | ||||
-rw-r--r-- | nscd/nscd.c | 7 | ||||
-rw-r--r-- | nscd/nscd.init | 10 | ||||
-rw-r--r-- | nscd/nscd_getai.c | 11 | ||||
-rw-r--r-- | nscd/nscd_helper.c | 7 | ||||
-rw-r--r-- | nscd/nscd_initgroups.c | 14 | ||||
-rw-r--r-- | nscd/nscd_nischeck.c | 4 |
8 files changed, 19 insertions, 47 deletions
diff --git a/nscd/Makefile b/nscd/Makefile index 9c32c68681..70a35198c2 100644 --- a/nscd/Makefile +++ b/nscd/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1998,2000,2002,2003,2004,2005 Free Software Foundation, Inc. +# Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -56,8 +56,6 @@ nscd-modules += selinux selinux-LIBS := -lselinux endif -LDLIBS-nscd = $(selinux-LIBS) - distribute := nscd.h nscd-client.h dbg_log.h \ $(addsuffix .c, $(filter-out xmalloc, $(nscd-modules))) \ nscd_nischeck.c nscd.conf nscd.init nscd_proto.h \ @@ -112,7 +110,7 @@ $(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o)) $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \ $(LDFLAGS) $(LDFLAGS-$(@F)) \ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \ - -o $@ $^ $(LDLIBS-nscd) $(common-objpfx)libc_nonshared.a + -o $@ $^ $(selinux-LIBS) $(common-objpfx)libc_nonshared.a endif # This makes sure -DNOT_IN_libc is passed for all these modules. diff --git a/nscd/connections.c b/nscd/connections.c index fe4989d6ef..aa760e0252 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1,5 +1,5 @@ /* Inner loops of cache daemon. - Copyright (C) 1998-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -605,10 +605,7 @@ send_ro_fd (struct database_dyn *db, char *key, int fd) /* Send the control message. We repeat when we are interrupted but everything else is ignored. */ -#ifndef MSG_NOSIGNAL -# define MSG_NOSIGNAL 0 -#endif - (void) TEMP_FAILURE_RETRY (sendmsg (fd, &msg, MSG_NOSIGNAL)); + (void) TEMP_FAILURE_RETRY (sendmsg (fd, &msg, 0)); if (__builtin_expect (debug_level > 0, 0)) dbg_log (_("provide access to FD %d, for %s"), db->ro_fd, key); diff --git a/nscd/nscd.c b/nscd/nscd.c index 3ae401f1f7..5cca127f91 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998-2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1998-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998. @@ -403,7 +403,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\ -"), "2005"); +"), "2004"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk and Ulrich Drepper"); } @@ -450,9 +450,6 @@ termination_handler (int signum) /* Synchronize memory. */ for (int cnt = 0; cnt < lastdb; ++cnt) { - if (!dbs[cnt].enabled) - continue; - /* Make sure nobody keeps using the database. */ dbs[cnt].head->timestamp = 0; diff --git a/nscd/nscd.init b/nscd/nscd.init index 23e20c3a82..d5c1cb9ae3 100644 --- a/nscd/nscd.init +++ b/nscd/nscd.init @@ -88,9 +88,9 @@ case "$1" in RETVAL=$? ;; status) - status nscd + status nscd RETVAL=$? - ;; + ;; restart) restart RETVAL=$? @@ -100,11 +100,9 @@ case "$1" in RETVAL=$? ;; reload) - echo -n $"Reloading $prog: " - killproc /usr/sbin/nscd -HUP + killproc /usr/sbin/nscd -HUP RETVAL=$? - echo - ;; + ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" RETVAL=1 diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c index 866f7b2a5f..24b374b0dc 100644 --- a/nscd/nscd_getai.c +++ b/nscd/nscd_getai.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -78,7 +78,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop) sizeof (ai_resp_mem)); if (sock == -1) { - /* nscd not running or wrong version. */ + /* nscd not running or wrong version or hosts caching disabled. */ __nss_not_use_nscd_hosts = 1; goto out; } @@ -151,13 +151,6 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop) } else { - if (__builtin_expect (ai_resp->found == -1, 0)) - { - /* The daemon does not cache this database. */ - __nss_not_use_nscd_hosts = 1; - goto out_close; - } - /* Store the error number. */ *h_errnop = ai_resp->error; diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index ea4fb968db..0e16cb8aeb 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -138,10 +138,7 @@ get_mapping (request_type type, const char *key, /* Failure or timeout. */ goto out_close2; -#ifndef MSG_NOSIGNAL -# define MSG_NOSIGNAL 0 -#endif - if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, MSG_NOSIGNAL)) != keylen) + if (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) != keylen) goto out_close2; mapfd = *(int *) CMSG_DATA (cmsg); diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c index daddf2e164..2ea9e7f862 100644 --- a/nscd/nscd_initgroups.c +++ b/nscd/nscd_initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -75,7 +75,7 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, sizeof (initgr_resp_mem)); if (sock == -1) { - /* nscd not running or wrong version. */ + /* nscd not running or wrong version or hosts caching disabled. */ __nss_not_use_nscd_group = 1; goto out; } @@ -101,7 +101,7 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, (initgr_resp->ngrps + 1) * sizeof (gid_t)); if (newp == NULL) /* We cannot increase the buffer size. */ - goto out_close; + goto out; *groupsp = newp; *size = initgr_resp->ngrps + 1; @@ -125,13 +125,6 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, } else { - if (__builtin_expect (initgr_resp->found == -1, 0)) - { - /* The daemon does not cache this database. */ - __nss_not_use_nscd_group = 1; - goto out_close; - } - /* No group found yet. */ retval = 0; @@ -150,7 +143,6 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, (*groupsp)[retval++] = group; } - out_close: if (sock != -1) close_not_cancel_no_status (sock); out: diff --git a/nscd/nscd_nischeck.c b/nscd/nscd_nischeck.c index 20f7bb0620..a6817cf79e 100644 --- a/nscd/nscd_nischeck.c +++ b/nscd/nscd_nischeck.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1999, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1999. @@ -91,6 +91,6 @@ 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\ -"), "2005"); +"), "2004"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } |