diff options
| author | Andreas Jaeger <aj@suse.de> | 2000-12-18 16:40:40 +0000 |
|---|---|---|
| committer | Andreas Jaeger <aj@suse.de> | 2000-12-18 16:40:40 +0000 |
| commit | 51eecc4aff951823741ec363b44c28a301be7c9c (patch) | |
| tree | 2b8db5bcb7e534934d8fa1dfbced57a7b70d0595 | |
| parent | 8cb019ed77e57b89c26864dfea33cc707615f923 (diff) | |
| download | glibc-51eecc4aff951823741ec363b44c28a301be7c9c.tar.xz glibc-51eecc4aff951823741ec363b44c28a301be7c9c.zip | |
Update.
2000-12-18 Andreas Jaeger <aj@suse.de>
* test-skeleton.c: Use temp_name_list instead of temp_name_list to
avoid collision with name_list from inet/netgroup.h.
* nss/nss_files/files-network.c (NEED_H_ERRNO): Define.
* include/grp.h (DECLARE_NSS_PROTOTYPES): New.
* include/pwd.h (DECLARE_NSS_PROTOTYPES): New.
* include/netdb.h (DECLARE_NSS_PROTOTYPES): New.
* include/shadow.h (DECLARE_NSS_PROTOTYPES): New.
* hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix
declaration to match prototype.
* hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise.
* hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise.
* hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent):
Likewise.
* nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise.
* nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise.
* nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise.
* nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise.
(_nss_nis_getservbyport_r): Likewise.
* nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise.
* nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise.
* nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise.
(_nss_nis_setnetent): Likewise
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise.
(_nss_nis_endnetgrent): Likewise.
* nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent):
Likewise.
(_nss_nisplus_setnetgrent): Likewise.
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise.
* nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise.
* nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise.
* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent):
Likewise.
* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent):
Likewise.
* nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent):
Likewise.
* nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent):
Likewise.
* nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise.
* nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise.
* nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise.
(_nss_dns_getnetbyaddr_r): Likewise.
32 files changed, 243 insertions, 50 deletions
@@ -1,3 +1,53 @@ +2000-12-18 Andreas Jaeger <aj@suse.de> + + * test-skeleton.c: Use temp_name_list instead of temp_name_list to + avoid collision with name_list from inet/netgroup.h. + + * nss/nss_files/files-network.c (NEED_H_ERRNO): Define. + + * include/grp.h (DECLARE_NSS_PROTOTYPES): New. + * include/pwd.h (DECLARE_NSS_PROTOTYPES): New. + * include/netdb.h (DECLARE_NSS_PROTOTYPES): New. + * include/shadow.h (DECLARE_NSS_PROTOTYPES): New. + + * hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix + declaration to match prototype. + * hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise. + * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise. + * hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent): + Likewise. + * nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise. + * nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise. + * nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise. + * nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise. + (_nss_nis_getservbyport_r): Likewise. + * nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise. + * nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise. + * nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise. + (_nss_nis_setnetent): Likewise + * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise. + (_nss_nis_endnetgrent): Likewise. + * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent): + Likewise. + (_nss_nisplus_setnetgrent): Likewise. + * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise. + * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise. + * nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise. + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent): + Likewise. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent): + Likewise. + * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent): + Likewise. + * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent): + Likewise. + * nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise. + * nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise. + * nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise. + (_nss_dns_getnetbyaddr_r): Likewise. + 2000-12-17 Andreas Jaeger <aj@suse.de> * sysdeps/generic/k_sinl.c (__kernel_sinl): Fix functions diff --git a/hesiod/nss_hesiod/hesiod-grp.c b/hesiod/nss_hesiod/hesiod-grp.c index cb7c0870e2..b3c5888bee 100644 --- a/hesiod/nss_hesiod/hesiod-grp.c +++ b/hesiod/nss_hesiod/hesiod-grp.c @@ -36,7 +36,7 @@ #include <nss/nss_files/files-parse.c> enum nss_status -_nss_hesiod_setgrent (void) +_nss_hesiod_setgrent (int stayopen) { return NSS_STATUS_SUCCESS; } diff --git a/hesiod/nss_hesiod/hesiod-proto.c b/hesiod/nss_hesiod/hesiod-proto.c index d77e8d9134..5910ddde63 100644 --- a/hesiod/nss_hesiod/hesiod-proto.c +++ b/hesiod/nss_hesiod/hesiod-proto.c @@ -46,7 +46,7 @@ LINE_PARSER ) enum nss_status -_nss_hesiod_setprotoent (void) +_nss_hesiod_setprotoent (int stayopen) { return NSS_STATUS_SUCCESS; } diff --git a/hesiod/nss_hesiod/hesiod-pwd.c b/hesiod/nss_hesiod/hesiod-pwd.c index b7d2dd5c09..1a962b982c 100644 --- a/hesiod/nss_hesiod/hesiod-pwd.c +++ b/hesiod/nss_hesiod/hesiod-pwd.c @@ -34,7 +34,7 @@ #include <nss/nss_files/files-parse.c> enum nss_status -_nss_hesiod_setpwent (void) +_nss_hesiod_setpwent (int stayopen) { return NSS_STATUS_SUCCESS; } diff --git a/hesiod/nss_hesiod/hesiod-service.c b/hesiod/nss_hesiod/hesiod-service.c index 8faea3aa5d..77f1be6496 100644 --- a/hesiod/nss_hesiod/hesiod-service.c +++ b/hesiod/nss_hesiod/hesiod-service.c @@ -47,7 +47,7 @@ LINE_PARSER ) enum nss_status -_nss_hesiod_setservent (void) +_nss_hesiod_setservent (int stayopen) { return NSS_STATUS_SUCCESS; } 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 diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c index 2de46088df..d2fec68cc3 100644 --- a/nis/nss_compat/compat-grp.c +++ b/nis/nss_compat/compat-grp.c @@ -169,7 +169,7 @@ internal_setgrent (ent_t *ent) enum nss_status -_nss_compat_setgrent (void) +_nss_compat_setgrent (int stayopen) { enum nss_status result; @@ -543,7 +543,7 @@ getgrent_next_file (struct group *result, ent_t *ent, { enum nss_status status; - /* Store the group in the blacklist for the "+" at the end of + /* Store the group in the blacklist for the "+" at the end of /etc/group */ blacklist_store_name (&result->gr_name[1], ent); status = getgrnam_plusgroup (&result->gr_name[1], result, buffer, diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c index cb2f19482d..8540f5563a 100644 --- a/nis/nss_compat/compat-pwd.c +++ b/nis/nss_compat/compat-pwd.c @@ -327,7 +327,7 @@ internal_setpwent (ent_t *ent) enum nss_status -_nss_compat_setpwent (void) +_nss_compat_setpwent (int stayopen) { enum nss_status result; diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index f254fadf5c..e184d79e6d 100644 --- a/nis/nss_compat/compat-spwd.c +++ b/nis/nss_compat/compat-spwd.c @@ -227,7 +227,7 @@ internal_setspent (ent_t *ent) enum nss_status -_nss_compat_setspent (void) +_nss_compat_setspent (int stayopen) { enum nss_status result; @@ -484,7 +484,7 @@ getspent_next_nisplus_netgr (const char *name, struct spwd *result, if (parse_res) { - /* Store the User in the blacklist for the "+" at the end of + /* Store the User in the blacklist for the "+" at the end of /etc/passwd */ blacklist_store_name (result->sp_namp, ent); copy_spwd_changes (result, &ent->pwd, p2, p2len); @@ -844,7 +844,7 @@ getspent_next_file (struct spwd *result, ent_t *ent, { /* XXX Do not use fixed length buffers. */ char buf2[1024]; - char *user, *host, *domain; + char *user, *host, *domain; struct __netgrent netgrdata; bzero (&netgrdata, sizeof (struct __netgrent)); diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c index 62e6b475b7..72cf1b2747 100644 --- a/nis/nss_nis/nis-grp.c +++ b/nis/nss_nis/nis-grp.c |
