From ed3691bab2a633991d2b30f4367221a9d804fedc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2006 18:37:10 +0000 Subject: [PATCH] * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map is empty simply return and use next service. * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise. --- ChangeLog | 4 ++++ nis/nss_nis/nis-rpc.c | 4 ++++ nis/nss_nis/nis-service.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index c3d9a0b..9dd545d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-19 Ulrich Drepper + * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map + is empty simply return and use next service. + * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise. + * locale/programs/charmap.c (charmap_read): Add new parameter. It tells us when not finding a charmap file is an error. * locale/programs/charmap.h: Adjust charmap_read prototype. diff --git a/nis/nss_nis/nis-rpc.c b/nis/nss_nis/nis-rpc.c index e7049ff..2fdb16d 100644 --- a/nis/nss_nis/nis-rpc.c +++ b/nis/nss_nis/nis-rpc.c @@ -117,6 +117,10 @@ internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen, if (intern->start == NULL) internal_nis_setrpcent (intern); + if (intern->next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; + /* Get the next entry until we found a correct one. */ do { diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c index c0e064d..0c17609 100644 --- a/nis/nss_nis/nis-service.c +++ b/nis/nss_nis/nis-service.c @@ -188,6 +188,10 @@ internal_nis_getservent_r (struct servent *serv, char *buffer, if (intern.start == NULL) internal_nis_setservent (); + if (intern.next == NULL) + /* Not one entry in the map. */ + return NSS_STATUS_NOTFOUND; + /* Get the next entry until we found a correct one. */ do { -- 2.7.4