From 8b80182964bde1fa84333674e454d41e1fa0c8ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Dec 2000 22:39:54 +0000 Subject: Update. 2000-12-05 H.J. Lu * nss/Makefile (routines): Add getnssent and getnssent_r. * nss/nsswitch.h (__nss_setent): New internal NSS function. (__nss_endent): Likewise. (__nss_getent_r): Likewise. (__nss_getent): Likewise. * nss/getnssent_r.c: New file. * nss/getnssent.c: New file. * nss/getXXent.c (H_ERRNO_VAR): Updated. (GETFUNC_NAME): Updated to call __nss_getent (). * nss/getXXent_r.c (H_ERRNO_VAR_P): New. (STAYOPEN_TMPVAR): Updated. (STAYOPEN_VAR): Updated. (SETFUNC_NAME): Updated to call __nss_setent (). (ENDFUNC_NAME): Updated to call __nss_endent (). (INTERNAL (REENTRANT_GETNAME)): Updated to call __nss_getent_r (). --- nss/nsswitch.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'nss/nsswitch.h') diff --git a/nss/nsswitch.h b/nss/nsswitch.h index c3398d7a7e..76ea8e3c3c 100644 --- a/nss/nsswitch.h +++ b/nss/nsswitch.h @@ -130,4 +130,35 @@ int __nss_next (service_user **ni, const char *fct_name, void **fctp, and return a pointer to this function if successful. */ void *__nss_lookup_function (service_user *ni, const char *fct_name); + +typedef int (*db_lookup_function) (service_user **, const char *, + 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, + int *, int *); +typedef int (*getent_r_function) (void *, char *, size_t, + void **result, int *); + +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); +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); +extern int __nss_getent_r (const char *getent_func_name, + const char *setent_func_name, + db_lookup_function lookup_fct, + service_user **nip, service_user **startp, + service_user **last_nip, int *stayon_tmp, + int res, + void *resbuf, char *buffer, size_t buflen, + void **result, int *h_errnop); +extern void *__nss_getent (getent_r_function func, + void **resbuf, char **buffer, size_t buflen, + size_t *buffer_size, int *h_errnop); + #endif /* nsswitch.h */ -- cgit v1.2.3