From 6ba4bddb61cb6033a7937152966a608c1bbced40 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 4 Jan 2011 18:48:47 +0100 Subject: s3: Make name_query use /tmp/.nmbd/unexpected --- nsswitch/wins.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'nsswitch/wins.c') diff --git a/nsswitch/wins.c b/nsswitch/wins.c index 6e3c84b608..51b78fba9a 100644 --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -103,10 +103,9 @@ static void nss_wins_init(void) static struct in_addr *lookup_byname_backend(const char *name, int *count) { - int fd = -1; struct ip_service *address = NULL; struct in_addr *ret = NULL; - int j, flags = 0; + int j; if (!initialised) { nss_wins_init(); @@ -131,11 +130,6 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return ret; } - fd = wins_lookup_open_socket_in(); - if (fd == -1) { - return NULL; - } - /* uggh, we have to broadcast to each interface in turn */ for (j=iface_count() - 1;j >= 0;j--) { const struct in_addr *bcast = iface_n_bcast_v4(j); @@ -147,8 +141,8 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) continue; } in_addr_to_sockaddr_storage(&ss, *bcast); - status = name_query(fd, name, 0x00, True, True, &ss, - NULL, &pss, count, &flags, NULL); + status = name_query(name, 0x00, True, True, &ss, + NULL, &pss, count, NULL); if (pss) { if ((ret = SMB_MALLOC_P(struct in_addr)) == NULL) { return NULL; @@ -159,7 +153,6 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) } } - close(fd); return ret; } -- cgit