summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/wins.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
committerGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
commit1e6e5b299c235b513095a76a4cd9fffc41e8fc9c (patch)
tree9f741529073ad411cc7328334e26d3e35b1d33f1 /source/nsswitch/wins.c
parenta11c5d7ad07d259d764aede4745d13f8163a8212 (diff)
downloadsamba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.gz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.xz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.zip
beginning to sync up for 2.2.5 release....
Diffstat (limited to 'source/nsswitch/wins.c')
-rw-r--r--source/nsswitch/wins.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/source/nsswitch/wins.c b/source/nsswitch/wins.c
index c88bd379100..d74b006bb92 100644
--- a/source/nsswitch/wins.c
+++ b/source/nsswitch/wins.c
@@ -118,7 +118,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
int fd;
struct in_addr *ret = NULL;
struct in_addr p;
- int j;
+ int j, flags;
if (!initialised) {
nss_wins_init();
@@ -132,13 +132,13 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
p = wins_srv_ip();
if( !is_zero_ip(p) ) {
- ret = name_query(fd,name,0x20,False,True, p, count);
+ ret = name_query(fd,name,0x20,False,True, p, count, &flags);
goto out;
}
if (lp_wins_support()) {
/* we are our own WINS server */
- ret = name_query(fd,name,0x20,False,True, *interpret_addr2("127.0.0.1"), count);
+ ret = name_query(fd,name,0x20,False,True, *interpret_addr2("127.0.0.1"), count, &flags);
goto out;
}
@@ -147,7 +147,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
j >= 0;
j--) {
struct in_addr *bcast = iface_n_bcast(j);
- ret = name_query(fd,name,0x20,True,True,*bcast,count);
+ ret = name_query(fd,name,0x20,True,True,*bcast,count, &flags);
if (ret) break;
}
@@ -319,4 +319,21 @@ _nss_wins_gethostbyname_r(const char *name, struct hostent *he,
return NSS_STATUS_SUCCESS;
}
+
+NSS_STATUS
+_nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he,
+ char *buffer, size_t buflen, int *errnop,
+ int *h_errnop)
+{
+ if(af!=AF_INET) {
+ *h_errnop = NO_DATA;
+ *errnop = EAFNOSUPPORT;
+ return NSS_STATUS_UNAVAIL;
+ }
+
+ return _nss_wins_gethostbyname_r(name,he,buffer,buflen,errnop,h_errnop);
+}
+
+
+
#endif