mirror of git://sourceware.org/git/glibc.git
Update.
2002-08-27 Ulrich Drepper <drepper@redhat.com> * nss/getXXbyYY_r.c (REENTRANT_NAME): If no service is available set h_errno to NO_RECOVERY [PR libc/4360].
This commit is contained in:
parent
b50f38778c
commit
b2ab1f5df8
|
|
@ -1,3 +1,8 @@
|
||||||
|
2002-08-27 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nss/getXXbyYY_r.c (REENTRANT_NAME): If no service is available
|
||||||
|
set h_errno to NO_RECOVERY [PR libc/4360].
|
||||||
|
|
||||||
2002-08-26 Ulrich Drepper <drepper@redhat.com>
|
2002-08-26 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* libio/Makefile (tests): Add bug-fopena+.
|
* libio/Makefile (tests): Add bug-fopena+.
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include "nsswitch.h"
|
#include "nsswitch.h"
|
||||||
#ifdef USE_NSCD
|
#ifdef USE_NSCD
|
||||||
# include <nscd/nscd_proto.h>
|
# include <nscd/nscd_proto.h>
|
||||||
|
|
@ -135,6 +136,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
||||||
#ifdef USE_NSCD
|
#ifdef USE_NSCD
|
||||||
int nscd_status;
|
int nscd_status;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef NEED_H_ERRNO
|
||||||
|
bool any_service = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PREPROCESS
|
#ifdef PREPROCESS
|
||||||
PREPROCESS;
|
PREPROCESS;
|
||||||
|
|
@ -203,6 +207,10 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
||||||
|
|
||||||
while (no_more == 0)
|
while (no_more == 0)
|
||||||
{
|
{
|
||||||
|
#ifdef NEED_H_ERRNO
|
||||||
|
any_service = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
status = DL_CALL_FCT (fct, (ADD_VARIABLES, resbuf, buffer, buflen,
|
status = DL_CALL_FCT (fct, (ADD_VARIABLES, resbuf, buffer, buflen,
|
||||||
&errno H_ERRNO_VAR));
|
&errno H_ERRNO_VAR));
|
||||||
|
|
||||||
|
|
@ -226,6 +234,11 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
||||||
done:
|
done:
|
||||||
#endif
|
#endif
|
||||||
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
|
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
|
||||||
|
#ifdef NEED_H_ERRNO
|
||||||
|
if (status != NSS_STATUS_SUCCESS && ! any_service)
|
||||||
|
/* We were not able to use any service. */
|
||||||
|
*h_errnop = NO_RECOVERY;
|
||||||
|
#endif
|
||||||
#ifdef POSTPROCESS
|
#ifdef POSTPROCESS
|
||||||
POSTPROCESS;
|
POSTPROCESS;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue