mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 16:21:06 +00:00
Update.
2004-08-15 Ulrich Drepper <drepper@redhat.com> * nss/getent.c: Allow queries for getaddrinfo with AF_INET and AF_INET6.
This commit is contained in:
parent
06ee3df6a8
commit
a7d248330f
@ -1,3 +1,8 @@
|
|||||||
|
2004-08-15 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nss/getent.c: Allow queries for getaddrinfo with AF_INET and
|
||||||
|
AF_INET6.
|
||||||
|
|
||||||
2004-08-14 Ulrich Drepper <drepper@redhat.com>
|
2004-08-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* po/de.po: Update from translation team.
|
* po/de.po: Update from translation team.
|
||||||
|
26
nss/getent.c
26
nss/getent.c
@ -295,7 +295,7 @@ hosts_keys (int number, char *key[])
|
|||||||
|
|
||||||
/* This is for hosts, but using getaddrinfo */
|
/* This is for hosts, but using getaddrinfo */
|
||||||
static int
|
static int
|
||||||
ahosts_keys (int number, char *key[])
|
ahosts_keys_int (int af, int xflags, int number, char *key[])
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -312,8 +312,8 @@ ahosts_keys (int number, char *key[])
|
|||||||
|
|
||||||
struct addrinfo hint;
|
struct addrinfo hint;
|
||||||
memset (&hint, '\0', sizeof (hint));
|
memset (&hint, '\0', sizeof (hint));
|
||||||
hint.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME;
|
hint.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME | xflags;
|
||||||
hint.ai_family = AF_UNSPEC;
|
hint.ai_family = af;
|
||||||
|
|
||||||
for (i = 0; i < number; ++i)
|
for (i = 0; i < number; ++i)
|
||||||
{
|
{
|
||||||
@ -360,6 +360,24 @@ ahosts_keys (int number, char *key[])
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ahosts_keys (int number, char *key[])
|
||||||
|
{
|
||||||
|
return ahosts_keys_int (AF_UNSPEC, 0, number, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ahostsv4_keys (int number, char *key[])
|
||||||
|
{
|
||||||
|
return ahosts_keys_int (AF_INET, 0, number, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ahostsv6_keys (int number, char *key[])
|
||||||
|
{
|
||||||
|
return ahosts_keys_int (AF_INET6, AI_V4MAPPED, number, key);
|
||||||
|
}
|
||||||
|
|
||||||
/* This is for netgroup */
|
/* This is for netgroup */
|
||||||
static int
|
static int
|
||||||
netgroup_keys (int number, char *key[])
|
netgroup_keys (int number, char *key[])
|
||||||
@ -715,6 +733,8 @@ struct
|
|||||||
{
|
{
|
||||||
#define D(name) { #name, name ## _keys },
|
#define D(name) { #name, name ## _keys },
|
||||||
D(ahosts)
|
D(ahosts)
|
||||||
|
D(ahostsv4)
|
||||||
|
D(ahostsv6)
|
||||||
D(aliases)
|
D(aliases)
|
||||||
D(ethers)
|
D(ethers)
|
||||||
D(group)
|
D(group)
|
||||||
|
Loading…
Reference in New Issue
Block a user