diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grp.h | 25 | ||||
-rw-r--r-- | include/netdb.h | 79 | ||||
-rw-r--r-- | include/pwd.h | 23 | ||||
-rw-r--r-- | include/shadow.h | 20 |
4 files changed, 143 insertions, 4 deletions
diff --git a/include/grp.h b/include/grp.h index 824b1648c2..bb5a0408b5 100644 --- a/include/grp.h +++ b/include/grp.h @@ -17,4 +17,29 @@ extern int __getgrgid_r (__gid_t __gid, struct group *__resultbuf, extern int __getgrnam_r (__const char *__name, struct group *__resultbuf, char *__buffer, size_t __buflen, struct group **__result); + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setgrent (int); \ +extern enum nss_status _nss_ ## service ## _endgrent (void); \ +extern enum nss_status _nss_ ## service ## _getgrgid_r \ + (gid_t gid, struct group *grp, char *buffer, \ + size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getgrnam_r \ + (const char *name, struct group *grp, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ##_getgrent_r \ + (struct group *result, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ##_initgroups_dyn \ + (const char *user, gid_t group, long int *start, \ + long int *size, gid_t **groupsp, long int limit, \ + int *errnop); + +DECLARE_NSS_PROTOTYPES (compat) +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (hesiod) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES #endif diff --git a/include/netdb.h b/include/netdb.h index 6a60d4ec8c..8c861d48cf 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -143,10 +143,81 @@ extern int ruserpass (const char *host, const char **aname, /* The following declarations and definitions have been removed from the public header since we don't want people to use them. */ -#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ -#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */ -#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose - returned address type. */ +#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ +#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */ +#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose + returned address type. */ #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) +#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, \ + int *herrnop); + +DECLARE_NSS_PROTOTYPES (compat) +DECLARE_NSS_PROTOTYPES (dns) +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (hesiod) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + #endif /* !_NETDB_H */ diff --git a/include/pwd.h b/include/pwd.h index f91622840a..25656ef281 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -13,4 +13,27 @@ extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf, extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf, char *__buffer, size_t __buflen, struct passwd **__result); + +#include <nss/nss.h> +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setpwent (int); \ +extern enum nss_status _nss_ ## service ## _endpwent (void); \ +extern enum nss_status _nss_ ## service ## _getpwnam_r \ + (const char *name, struct passwd *pwd, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getpwuid_r \ + (uid_t uid, struct passwd *pwd, \ + char *buffer, size_t buflen, int *errnop); \ +extern enum nss_status _nss_ ## service ##_getpwent_r \ + (struct passwd *result, char *buffer, \ + size_t buflen, int *errnop); + +DECLARE_NSS_PROTOTYPES (compat) +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (hesiod) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + #endif diff --git a/include/shadow.h b/include/shadow.h index b7d49f7cfc..5bbaac3543 100644 --- a/include/shadow.h +++ b/include/shadow.h @@ -15,4 +15,24 @@ extern int __fgetspent_r (FILE *__stream, struct spwd *__result_buf, struct spwd **__result); extern int __lckpwdf (void); extern int __ulckpwdf (void); + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _setspent (int); \ +extern enum nss_status _nss_ ## service ## _endspent (void); \ +extern enum nss_status _nss_ ## service ## _getspent_r \ + (struct spwd *pwd, char *buffer, size_t buflen, \ + int *errnop); \ +extern enum nss_status _nss_ ## service ## _getspnam_r \ + (const char *name, struct spwd *pwd, \ + char *buffer, size_t buflen, int *errnop); + +DECLARE_NSS_PROTOTYPES (compat) +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (hesiod) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + + #endif |