diff options
author | 2000-04-28 05:12:30 +0000 | |
---|---|---|
committer | 2000-04-28 05:12:30 +0000 | |
commit | 0a55a284756cef31b9f0a25d9c6a0fc74c7a626f (patch) | |
tree | fd1cb046398d7f6a37a4f97b75da6ab093384cab /hesiod | |
parent | Update. (diff) | |
download | glibc-0a55a284756cef31b9f0a25d9c6a0fc74c7a626f.tar.gz glibc-0a55a284756cef31b9f0a25d9c6a0fc74c7a626f.tar.bz2 glibc-0a55a284756cef31b9f0a25d9c6a0fc74c7a626f.zip |
Update.
2000-04-27 Ulrich Drepper <drepper@redhat.com>
* hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_initgroups): Handle
overflows in conversion from ASCII.
2000-04-26 Jakub Jelinek <jakub@redhat.com>
* Makeconfig (full_config_sysdirs): Renamed from full-config-sysdirs.
* Makerules (full_config_sysdirs): Likewise.
* MakeTAGS (full_config_sysdirs): Likewise.
2000-04-26 Jakub Jelinek <jakub@redhat.com>
* .cvsignore: Remove linuxthreads.
* po/.cvsignore: Remove *.pot.
* posix/glob/.cvsignore: Removed.
* sysdeps/unix/bsd/osf/.cvsignore: Removed.
2000-04-25 Andreas Jaeger <aj@suse.de>
* conform/Makefile (distribute): Also distribute contents of
subdirectories.
* Makerules (no_deps): Remove abi-versions.h.
* nis/nis_print_group_entry.c: Include alloca.h for alloca prototype.
2000-04-25 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/sparc64/elf/Dist: Remove.
* sysdeps/sparc/sparc64/elf/crtbegin.S: Remove.
* sysdeps/sparc/sparc64/elf/crtbeginS.S: Remove.
* sysdeps/sparc/sparc64/elf/crtend.S: Remove.
* sysdeps/sparc/sparc64/elf/crtendS.S: Remove.
* sysdeps/sparc/sparc64/elf/Makefile: Don't build crtbegin/crtend
objects.
2000-04-25 Thorsten Kukuk <kukuk@suse.de>
* nscd/grpcache.c: Fix gr_name pointer [PR/1702].
2000-04-23 Bruno Haible <clisp.cons.org>
* intl/dcigettext.c: Define _GNU_SOURCE as early as possible.
* intl/l10nflist.c: Likewise.
2000-04-23 Bruno Haible <clisp.cons.org>
* intl/bindtextdom.c [!_LIBC]: Define __libc_rwlock_define,
__libc_rwlock_wrlock, __libc_rwlock_unlock as empty.
* intl/textdomain.c [!_LIBC]: Likewise.
* intl/dcigettext.c [!_LIBC]: Define __libc_rwlock_define_initialized,
__libc_rwlock_rdlock, __libc_rwlock_unlock as empty.
* intl/loadmsgcat.c (_nl_load_domain) [!_LIBC, !HAVE_ICONV]: Avoid
syntax error.
2000-04-23 Bruno Haible <clisp.cons.org>
* intl/dcigettext.c (_nl_find_msg): Do the plural treatment and
character set conversion also in the case the translation was found
after a hash collision or through binary search. Store the maximum
index together with the converted message. Use iconv() when available.
In case of out of memory during conversion, return the unconverted
translated string, not NULL.
Diffstat (limited to 'hesiod')
-rw-r--r-- | hesiod/nss_hesiod/hesiod-grp.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/hesiod/nss_hesiod/hesiod-grp.c b/hesiod/nss_hesiod/hesiod-grp.c index c0b56ac214..a973fab80f 100644 --- a/hesiod/nss_hesiod/hesiod-grp.c +++ b/hesiod/nss_hesiod/hesiod-grp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997. @@ -188,14 +188,19 @@ internal_gid_from_group (void *context, const char *groupname, gid_t *group) { char *endp; char *q = ++p; + long int val; q = p; while (*q != '\0' && *q != ':') ++q; - *group = strtol (p, &endp, 10); - if (endp == q && endp != p) - status = NSS_STATUS_SUCCESS; + val = strtol (p, &endp, 10); + if (sizeof (gid_t) == sizeof (long int) || (gid_t) val == val) + { + *group = val; + if (endp == q && endp != p) + status = NSS_STATUS_SUCCESS; + } } hesiod_free_list (context, grp_res); } @@ -219,7 +224,7 @@ _nss_hesiod_initgroups (const char *user, gid_t group, long int *start, if (list == NULL) { - hesiod_end(context); + hesiod_end (context); return errno == ENOENT ? NSS_STATUS_NOTFOUND : NSS_STATUS_UNAVAIL; } @@ -231,6 +236,7 @@ _nss_hesiod_initgroups (const char *user, gid_t group, long int *start, { char *endp; char *q; + long int val; status = NSS_STATUS_NOTFOUND; @@ -241,21 +247,24 @@ _nss_hesiod_initgroups (const char *user, gid_t group, long int *start, if (*q != '\0') *q++ = '\0'; - group = strtol (p, &endp, 10); - if (*endp == '\0' && endp != p) - status = NSS_STATUS_SUCCESS; - else - status = internal_gid_from_group (context, p, &group); + val = strtol (p, &endp, 10); + if (sizeof (gid_t) == sizeof (long int) || (gid_t) val == val) + { + if (*endp == '\0' && endp != p) + status = NSS_STATUS_SUCCESS; + else + status = internal_gid_from_group (context, p, &group); - if (status == NSS_STATUS_SUCCESS - && !internal_gid_in_list (groups, group, *start)) - groups[(*start)++] = group; + if (status == NSS_STATUS_SUCCESS + && !internal_gid_in_list (groups, group, *start)) + groups[(*start)++] = group; + } p = q; } hesiod_free_list (context, list); - hesiod_end(context); + hesiod_end (context); return NSS_STATUS_SUCCESS; } |