diff options
author | John Terpstra <jht@samba.org> | 2000-10-09 21:44:00 +0000 |
---|---|---|
committer | John Terpstra <jht@samba.org> | 2000-10-09 21:44:00 +0000 |
commit | 96e27b10bfebbf8f577d7e341cdf2740b607bb15 (patch) | |
tree | ffe3af2ef6663ba5a92a466904d5cd03f13836bf /source3 | |
parent | 43b2bdce3ebf2598f97a611ad879c7ab527728fd (diff) | |
download | samba-96e27b10bfebbf8f577d7e341cdf2740b607bb15.tar.gz samba-96e27b10bfebbf8f577d7e341cdf2740b607bb15.tar.bz2 samba-96e27b10bfebbf8f577d7e341cdf2740b607bb15.zip |
Fixes to allow wins.c to compile to allow building of libnss_wins.so.
(This used to be commit 3fb2e94c4430c570639c0e4d1caeed3a19bbd09b)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 3 | ||||
-rw-r--r-- | source3/nsswitch/wins.c | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 7ad6f6e64e..c73cba05b8 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -337,6 +337,9 @@ WINBIND_NSS_OBJ = nsswitch/winbind.o nsswitch/wb_common.o WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) +NSS_OBJ_0 = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) $(LIBSMB_OBJ) $(LIB_OBJ) $(NSSWINS_OBJ) +NSS_OBJ = $(NSS_OBJ_0:.o=.po) + ###################################################################### # now the rules... ###################################################################### diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c index ca0f22e3a6..6fbaedcdea 100644 --- a/source3/nsswitch/wins.c +++ b/source3/nsswitch/wins.c @@ -36,6 +36,7 @@ struct in_addr *lookup_backend(const char *name, int *count) int fd; static int initialised; struct in_addr *ret; + char *p; int j; if (!initialised) { @@ -55,8 +56,16 @@ struct in_addr *lookup_backend(const char *name, int *count) set_socket_options(fd,"SO_BROADCAST"); - if( !zero_ip( wins_ip ) ) { - ret = name_query( fd, name, 0x20, False, True, wins_src_ip(), count ); +/* The next four lines commented out by JHT + and replaced with the four lines following */ +/* if( !zero_ip( wins_ip ) ) { + * ret = name_query( fd, name, 0x20, False, True, wins_src_ip(), count ); + * goto out; + * } + */ + p = lp_wins_server(); + if (p && *p) { + ret = name_query(fd,name,0x20,False,True, *interpret_addr2(p), count); goto out; } |