Skip to content

Commit

Permalink
* nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map
Browse files Browse the repository at this point in the history
	is empty simply return and use next service.
	* nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise.
  • Loading branch information
Ulrich Drepper committed Aug 19, 2006
1 parent 8a6537b commit ed3691b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2006-08-19 Ulrich Drepper <drepper@redhat.com>

* 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.
Expand Down
4 changes: 4 additions & 0 deletions nis/nss_nis/nis-rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 4 additions & 0 deletions nis/nss_nis/nis-service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit ed3691b

Please sign in to comment.