diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-03-26 11:22:19 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-03-26 11:22:19 +0000 |
commit | f23e5ee26d14b7931c65e5df0bf46ff356c6177b (patch) | |
tree | 7ec5160f8a03894ed0f4be9a1c312ed5bffdc7e5 /nis | |
parent | d0b6ac6c5023a223e150c49c422c7ad2bd99456c (diff) | |
download | glibc-f23e5ee26d14b7931c65e5df0bf46ff356c6177b.tar glibc-f23e5ee26d14b7931c65e5df0bf46ff356c6177b.tar.gz glibc-f23e5ee26d14b7931c65e5df0bf46ff356c6177b.tar.bz2 glibc-f23e5ee26d14b7931c65e5df0bf46ff356c6177b.zip |
Updated to fedora-glibc-20080326T1041cvs/fedora-glibc-2_7_90-12
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nis_call.c | 6 | ||||
-rw-r--r-- | nis/nss_compat/compat-pwd.c | 15 | ||||
-rw-r--r-- | nis/nss_compat/compat-spwd.c | 6 |
3 files changed, 12 insertions, 15 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c index c571e8f367..6ae4ce5dbd 100644 --- a/nis/nis_call.c +++ b/nis/nis_call.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2001, 2004, 2005, 2006, 2007 +/* Copyright (C) 1997, 1998, 2001, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -592,8 +592,10 @@ nis_server_cache_search (const_nis_name name, int search_parent, XDR xdrs; struct stat64 st; + int saved_errno = errno; if (stat64 ("/var/nis/NIS_COLD_START", &st) < 0) st.st_mtime = nis_cold_start_mtime + 1; + __set_errno (saved_errno); __libc_lock_lock (nis_server_cache_lock); @@ -741,7 +743,9 @@ __nisfind_server (const_nis_name name, int search_parent, return result; } + int saved_errno = errno; *dir = readColdStartFile (); + __set_errno (saved_errno); if (*dir == NULL) /* No /var/nis/NIS_COLD_START->no NIS+ installed. */ return NIS_UNAVAIL; diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c index df8f91eea0..669522f21a 100644 --- a/nis/nss_compat/compat-pwd.c +++ b/nis/nss_compat/compat-pwd.c @@ -116,16 +116,11 @@ init_nss_interface (void) static void give_pwd_free (struct passwd *pwd) { - if (pwd->pw_name != NULL) - free (pwd->pw_name); - if (pwd->pw_passwd != NULL) - free (pwd->pw_passwd); - if (pwd->pw_gecos != NULL) - free (pwd->pw_gecos); - if (pwd->pw_dir != NULL) - free (pwd->pw_dir); - if (pwd->pw_shell != NULL) - free (pwd->pw_shell); + free (pwd->pw_name); + free (pwd->pw_passwd); + free (pwd->pw_gecos); + free (pwd->pw_dir); + free (pwd->pw_shell); memset (pwd, '\0', sizeof (struct passwd)); } diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index a5977681f2..95f7355945 100644 --- a/nis/nss_compat/compat-spwd.c +++ b/nis/nss_compat/compat-spwd.c @@ -113,10 +113,8 @@ init_nss_interface (void) static void give_spwd_free (struct spwd *pwd) { - if (pwd->sp_namp != NULL) - free (pwd->sp_namp); - if (pwd->sp_pwdp != NULL) - free (pwd->sp_pwdp); + free (pwd->sp_namp); + free (pwd->sp_pwdp); memset (pwd, '\0', sizeof (struct spwd)); pwd->sp_warn = -1; |