Skip to content

Commit

Permalink
Handle missing NSS modules and those without callbacks.
Browse files Browse the repository at this point in the history
getaddrinfo didn't update the status variable in that round of the
loop if no callback was used.
(cherry picked from commit 6573175)
  • Loading branch information
Ulrich Drepper authored and Andreas Schwab committed Aug 17, 2009
1 parent c87c885 commit aa152ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2009-07-25 Ulrich Drepper <drepper@redhat.com>

[BZ #10448]
* sysdeps/posix/getaddrinfo.c (gaih_inet): If NSS module contains no
callback we must touch the status to avoid using stale value.

2009-06-16 Ulrich Drepper <drepper@redhat.com>

* login/Makefile: Build pt_chown as PIE.
Expand Down
2 changes: 2 additions & 0 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
&& inet6_status != NSS_STATUS_UNAVAIL)
status = inet6_status;
}
else
status = NSS_STATUS_UNAVAIL;
}

if (nss_next_action (nip, status) == NSS_ACTION_RETURN)
Expand Down

0 comments on commit aa152ec

Please sign in to comment.