diff options
Diffstat (limited to 'nss/nsswitch.h')
-rw-r--r-- | nss/nsswitch.h | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/nss/nsswitch.h b/nss/nsswitch.h index 0074ee1d65..63573b9ebc 100644 --- a/nss/nsswitch.h +++ b/nss/nsswitch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,7 +32,8 @@ typedef enum { NSS_ACTION_CONTINUE, - NSS_ACTION_RETURN + NSS_ACTION_RETURN, + NSS_ACTION_MERGE } lookup_actions; @@ -95,17 +96,19 @@ typedef struct name_database } name_database; +#ifdef USE_NSCD /* Indices into DATABASES in nsswitch.c and __NSS_DATABASE_CUSTOM. */ enum { -#define DEFINE_DATABASE(arg) NSS_DBSIDX_##arg, -#include "databases.def" -#undef DEFINE_DATABASE +# define DEFINE_DATABASE(arg) NSS_DBSIDX_##arg, +# include "databases.def" +# undef DEFINE_DATABASE NSS_DBSIDX_max }; /* Flags whether custom rules for database is set. */ -extern bool __nss_database_custom[NSS_DBSIDX_max]; +extern bool __nss_database_custom[NSS_DBSIDX_max] attribute_hidden; +#endif /* Warning for NSS functions, which don't require dlopen if glibc was built with --enable-static-nss. */ @@ -167,8 +170,7 @@ extern void __nss_disable_nscd (void (*) (size_t, struct traced_file *)); typedef int (*db_lookup_function) (service_user **, const char *, const char *, - void **) - internal_function; + void **); typedef enum nss_status (*setent_function) (int); typedef enum nss_status (*endent_function) (void); typedef enum nss_status (*getent_function) (void *, char *, size_t, @@ -180,11 +182,13 @@ extern void __nss_setent (const char *func_name, db_lookup_function lookup_fct, service_user **nip, service_user **startp, service_user **last_nip, int stayon, - int *stayon_tmp, int res); + int *stayon_tmp, int res) + attribute_hidden; extern void __nss_endent (const char *func_name, db_lookup_function lookup_fct, service_user **nip, service_user **startp, - service_user **last_nip, int res); + service_user **last_nip, int res) + attribute_hidden; extern int __nss_getent_r (const char *getent_func_name, const char *setent_func_name, db_lookup_function lookup_fct, @@ -192,11 +196,23 @@ extern int __nss_getent_r (const char *getent_func_name, service_user **last_nip, int *stayon_tmp, int res, void *resbuf, char *buffer, size_t buflen, - void **result, int *h_errnop); + void **result, int *h_errnop) + attribute_hidden; extern void *__nss_getent (getent_r_function func, void **resbuf, char **buffer, size_t buflen, - size_t *buffer_size, int *h_errnop); + size_t *buffer_size, int *h_errnop) + attribute_hidden; +struct resolv_context; struct hostent; +extern int __nss_hostname_digits_dots_context (struct resolv_context *, + const char *name, + struct hostent *resbuf, + char **buffer, + size_t *buffer_size, + size_t buflen, + struct hostent **result, + enum nss_status *status, int af, + int *h_errnop) attribute_hidden; extern int __nss_hostname_digits_dots (const char *name, struct hostent *resbuf, char **buffer, size_t *buffer_size, size_t buflen, @@ -209,4 +225,13 @@ libc_hidden_proto (__nss_hostname_digits_dots) #define MAX_NR_ALIASES 48 #define MAX_NR_ADDRS 48 +/* Prototypes for __nss_*_lookup2 functions. */ +#define DEFINE_DATABASE(arg) \ + extern service_user *__nss_##arg##_database attribute_hidden; \ + int __nss_##arg##_lookup2 (service_user **, const char *, \ + const char *, void **); \ + libc_hidden_proto (__nss_##arg##_lookup2) +#include "databases.def" +#undef DEFINE_DATABASE + #endif /* nsswitch.h */ |