diff options
-rw-r--r-- | include/aliases.h | 16 | ||||
-rw-r--r-- | include/netdb.h | 116 | ||||
-rw-r--r-- | include/netinet/ether.h | 25 | ||||
-rw-r--r-- | include/rpc/netdb.h | 20 | ||||
-rw-r--r-- | nis/nis_intern.h | 6 | ||||
-rw-r--r-- | nis/nss_nis/nis-rpc.c | 2 |
6 files changed, 125 insertions, 60 deletions
diff --git a/include/aliases.h b/include/aliases.h index 3932e52097..ea87cf989c 100644 --- a/include/aliases.h +++ b/include/aliases.h @@ -17,4 +17,20 @@ extern int __old_getaliasbyname_r (__const char *__restrict __name, char *__restrict __buffer, size_t __buflen, struct aliasent **__restrict __result); +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setaliasent (void); \ +extern enum nss_status _nss_ ## service ## _endaliasent (void); \ +extern enum nss_status _nss_ ## service ## _getaliasent_r \ + (struct aliasent *alias, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getaliasbyname_r \ + (const char *name, struct aliasent *alias, \ + char *buffer, size_t buflen, int *errnop); + + +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) +#undef DECLARE_NSS_PROTOTYPES + #endif diff --git a/include/netdb.h b/include/netdb.h index 8c861d48cf..141dce505a 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -151,64 +151,64 @@ extern int ruserpass (const char *host, const char **aname, #include <inet/netgroup.h> -#define DECLARE_NSS_PROTOTYPES(service) \ -extern enum nss_status _nss_ ## service ## _setprotoent (int); \ -extern enum nss_status _nss_ ## service ## _endprotoent (void); \ -extern enum nss_status _nss_ ## service ## _getprotoent_r \ - (struct protoent *proto, char *buffer, size_t buflen, \ - int *errnop); \ -extern enum nss_status _nss_ ## service ## _getprotobyname_r \ - (const char *name, struct protoent *proto, \ - char *buffer, size_t buflen, int *errnop); \ -extern enum nss_status _nss_ ## service ## _getprotobynumber_r \ - (int number, struct protoent *proto, \ - char *buffer, size_t buflen, int *errnop); \ -extern enum nss_status _nss_ ## service ## _sethostent (int); \ -extern enum nss_status _nss_ ## service ## _endhostent (void); \ -extern enum nss_status _nss_ ## service ## _gethostent_r \ - (struct hostent *host, char *buffer, size_t buflen, \ - int *errnop, int *h_errnop); \ -extern enum nss_status _nss_ ## service ## _gethostbyname2_r \ - (const char *name, int af, struct hostent *host, \ - char *buffer, size_t buflen, int *errnop, \ - int *h_errnop); \ -extern enum nss_status _nss_ ## service ## _gethostbyname_r \ - (const char *name, struct hostent *host, char *buffer, \ - size_t buflen, int *errnop, int *h_errnop); \ -extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \ - (const void *addr, socklen_t addrlen, int af, \ - struct hostent *host, char *buffer, size_t buflen, \ - int *errnop, int *h_errnop); \ -extern enum nss_status _nss_ ## service ## _setservent (int); \ -extern enum nss_status _nss_ ## service ## _endservent (void); \ -extern enum nss_status _nss_ ## service ## _getservent_r \ - (struct servent *serv, char *buffer, size_t buflen, \ - int *errnop); \ -extern enum nss_status _nss_ ## service ## _getservbyname_r \ - (const char *name, const char *protocol, \ - struct servent *serv, char *buffer, size_t buflen, \ - int *errnop); \ -extern enum nss_status _nss_ ## service ## _getservbyport_r \ - (int port, const char *protocol, struct servent *serv, \ - char *buffer, size_t buflen, int *errnop); \ -extern enum nss_status _nss_ ## service ## _setnetgrent \ - (const char *group, struct __netgrent *result); \ -extern enum nss_status _nss_ ## service ## _endnetgrent \ - (struct __netgrent *result); \ -extern enum nss_status _nss_ ## service ##_getnetgrent_r \ - (struct __netgrent *result, char *buffer, \ - size_t buflen, int *errnop); \ -extern enum nss_status _nss_## service ##_setnetent (int stayopen); \ -extern enum nss_status _nss_ ## service ## _endnetent (void); \ -extern enum nss_status _nss_## service ##_getnetent_r \ - (struct netent *net, char *buffer, size_t buflen, \ - int *errnop, int *herrnop); \ -extern enum nss_status _nss_## service ##_getnetbyname_r \ - (const char *name, struct netent *net, char *buffer, \ - size_t buflen, int *errnop, int *herrnop); \ -extern enum nss_status _nss_## service ##_getnetbyaddr_r \ - (uint32_t addr, int type, struct netent *net, \ - char *buffer, size_t buflen, int *errnop, \ +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setprotoent (int); \ +extern enum nss_status _nss_ ## service ## _endprotoent (void); \ +extern enum nss_status _nss_ ## service ## _getprotoent_r \ + (struct protoent *proto, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getprotobyname_r \ + (const char *name, struct protoent *proto, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getprotobynumber_r \ + (int number, struct protoent *proto, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _sethostent (int); \ +extern enum nss_status _nss_ ## service ## _endhostent (void); \ +extern enum nss_status _nss_ ## service ## _gethostent_r \ + (struct hostent *host, char *buffer, size_t buflen, \ + int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyname2_r \ + (const char *name, int af, struct hostent *host, \ + char *buffer, size_t buflen, int *errnop, \ + int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyname_r \ + (const char *name, struct hostent *host, char *buffer, \ + size_t buflen, int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \ + (const void *addr, socklen_t addrlen, int af, \ + struct hostent *host, char *buffer, size_t buflen, \ + int *errnop, int *h_errnop); \ +extern enum nss_status _nss_ ## service ## _setservent (int); \ +extern enum nss_status _nss_ ## service ## _endservent (void); \ +extern enum nss_status _nss_ ## service ## _getservent_r \ + (struct servent *serv, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getservbyname_r \ + (const char *name, const char *protocol, \ + struct servent *serv, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getservbyport_r \ + (int port, const char *protocol, struct servent *serv, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _setnetgrent \ + (const char *group, struct __netgrent *result); \ +extern enum nss_status _nss_ ## service ## _endnetgrent \ + (struct __netgrent *result); \ +extern enum nss_status _nss_ ## service ## _getnetgrent_r \ + (struct __netgrent *result, char *buffer, \ + size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _setnetent (int stayopen); \ +extern enum nss_status _nss_ ## service ## _endnetent (void); \ +extern enum nss_status _nss_ ## service ## _getnetent_r \ + (struct netent *net, char *buffer, size_t buflen, \ + int *errnop, int *herrnop); \ +extern enum nss_status _nss_ ## service ## _getnetbyname_r \ + (const char *name, struct netent *net, char *buffer, \ + size_t buflen, int *errnop, int *herrnop); \ +extern enum nss_status _nss_ ## service ## _getnetbyaddr_r \ + (uint32_t addr, int type, struct netent *net, \ + char *buffer, size_t buflen, int *errnop, \ int *herrnop); DECLARE_NSS_PROTOTYPES (compat) diff --git a/include/netinet/ether.h b/include/netinet/ether.h index 60ef5a3abf..c0b1e2beee 100644 --- a/include/netinet/ether.h +++ b/include/netinet/ether.h @@ -1 +1,26 @@ +#ifndef _NETINET_ETHER_H #include <inet/netinet/ether.h> + +struct etherent; + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setetherent (void); \ +extern enum nss_status _nss_ ## service ## _endetherent (void); \ +extern enum nss_status _nss_ ## service ## _getetherent_r \ + (struct etherent *result, char *buffer, \ + size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _gethostton_r \ + (const char *name, struct etherent *eth, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getntohost_r \ + (const struct ether_addr *addr, \ + struct etherent *eth, \ + char *buffer, size_t buflen, int *errnop); + +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + +#endif diff --git a/include/rpc/netdb.h b/include/rpc/netdb.h index 54a4b70052..aec359ac98 100644 --- a/include/rpc/netdb.h +++ b/include/rpc/netdb.h @@ -21,4 +21,24 @@ extern int __getrpcent_r (struct rpcent *__result_buf, char *__buffer, extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result); +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setrpcent (int); \ +extern enum nss_status _nss_ ## service ## _endrpcent (void); \ +extern enum nss_status _nss_ ## service ## _getrpcent_r \ + (struct rpcent *rpc, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getrpcbyname_r \ + (const char *name, struct rpcent *rpc, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getrpcbynumber_r \ + (int number, struct rpcent *rpc, \ + char *buffer, size_t buflen, int *errnop); + + +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + #endif diff --git a/nis/nis_intern.h b/nis/nis_intern.h index 1d6f017c2c..3395046c3f 100644 --- a/nis/nis_intern.h +++ b/nis/nis_intern.h @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -46,6 +46,10 @@ extern nis_error __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs, caddr_t req, xdrproc_t xres, caddr_t resp, unsigned int flags, nis_cb *cb); +extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog, + xdrproc_t xargs, caddr_t req, + xdrproc_t xres, caddr_t resp, + unsigned int flags, nis_cb *cb); /* NIS+ callback */ extern nis_error __nis_do_callback (struct dir_binding *bptr, diff --git a/nis/nss_nis/nis-rpc.c b/nis/nss_nis/nis-rpc.c index 8e0fa4cec0..be7a2d09df 100644 --- a/nis/nss_nis/nis-rpc.c +++ b/nis/nss_nis/nis-rpc.c @@ -115,7 +115,7 @@ internal_nis_setrpcent (intern_t *intern) } enum nss_status -_nss_nis_setrpcent (void) +_nss_nis_setrpcent (int stayopen) { enum nss_status status; |