summaryrefslogtreecommitdiff
path: root/source3/nsswitch/wins.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-06Fix a memleakVolker Lendecke1-0/+1
Fixes Coverity ID 557 (This used to be commit fe882a575152233de6f4bf2143aca681319b0226)
2008-02-27Fix caller of node_status_query() to use sockaddr_storage().Michael Adam1-3/+5
Caller is hidden inside an #ifdef . Michael (This used to be commit 4a0d1ad601facf158db0c1d1c320e9e1369093d0)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison1-1/+1
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-11-03Remove more static data from lib/util_sock.c andJeremy Allison1-1/+1
callers. Jeremy. (This used to be commit 35aaa36f82c70964cee5d0778eb04547b226dd3f)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-3/+13
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-2/+2
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-1/+4
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10r25022: Fix coverity #395. Resource leak on error.Jeremy Allison1-6/+13
Jeremy. (This used to be commit 6a237600b825f4df2241277bdd80e98669f69685)
2007-10-10r24737: Remove older TODO: Convert internal_resolve_name() and friends to ↵Günther Deschner1-1/+1
NTSTATUS. Guenther (This used to be commit 8300aac4944613e411a78ab98de5d77f8fd38fa7)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r20269: merge -r20264:20267 from SAMBA_3_0_24Herb Lewis1-0/+5
more no previous prototype warnings (This used to be commit 41be182f78762372ae13759ede5d2bd40a71d7f5)
2007-10-10r17102: Fix segfault in libnss_wins [bugzilla #3937].Günther Deschner1-0/+1
Guenther (This used to be commit d73d0ec3d074f1acc4fe1c78d218aabd0fe4118a)
2007-10-10r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500Derrell Lipman1-1/+1
lp_load() could not be called multiple times to modify parameter settings based on reading from multiple configuration settings. Each time, it initialized all of the settings back to their defaults before reading the specified configuration file. This patch adds a parameter to lp_load() specifying whether the settings should be initialized. It does, however, still force the settings to be initialized the first time, even if the request was to not initialize them. (Not doing so could wreak havoc due to uninitialized values.) (This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
2007-10-10r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter1-2/+0
(This used to be commit 985dbb47d925e79c1195ca219f7ab5d6648b22b8)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-3/+3
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-1/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r1583: Patch by Fabien Chevalier <fabien.chevalier@supelec.fr>Andrew Bartlett1-1/+1
We may not have any interfaces up at all, so initialise the return variable. Fixes Debian bug #252591 Andrew Bartlett (This used to be commit 35aabae9d9bf66ef2c8eb4e07a850c606d8236d2)
2007-10-10r376: BUG 1288: resolve any machine netbios name (0x00) and not just servers ↵Gerald Carter1-2/+2
(0x20) (This used to be commit d96929b5b1d8d149ac023a30964925952587c258)
2007-10-10r248: Add support for printing out the MAC address on nmblookup.Richard Sharpe1-1/+1
(This used to be commit bf9f02be5fc1d09c8c08c78c3f2df23b2099ba4f)
2004-01-08Use StrCaseCmp, not strcasecmp. Should fix winbind build on IRIXJelmer Vernooij1-2/+2
(This used to be commit 65b01f67d5725bc54e6bc19b6e84beef38e372f8)
2003-12-11fixed bad formal parameter type in get_static(); patch Andy PolyakovGerald Carter1-1/+1
(This used to be commit 9c70e4b44e0dda8f2af4172b928437bd9d3e8b7c)
2003-09-08Fix for bug #299.Tim Potter1-30/+80
There was some confusion over dynamically allocated lists of pointers (i.e you have to make space for the list of pointers and what they are pointing too) in the memory buffer passed in from libc. Valgrind is much happer now and as a bonus there is no segfault. (This used to be commit 7907c44414acb841a9001e82285790eece73d032)
2003-07-23Move a function to avoid a warning.Tim Potter1-24/+24
(This used to be commit a3b4c57503e0966145b0adab247297e4c8e0f165)
2003-06-25large change:Gerald Carter1-2/+9
*) consolidates the dc location routines again (dns and netbios) get_dc_list() or get_sorted_dc_list() is the authoritative means of locating DC's again. (also inludes a flag to get_dc_list() to define if this should be a DNS only lookup or not) (however, if you set "name resolve order = hosts wins" you could still get DNS queries for domain name IFF ldap_domain2hostlist() fails. The answer? Fix your DNS setup) *) enabled DOMAIN<0x1c> lookups to be funneled through resolve_hosts resulting in a call to ldap_domain2hostlist() if lp_security() == SEC_ADS *) enables name cache for winbind ADS backend *) enable the negative connection cache for winbind ADS backend *) removes some old dead code *) consolidates some duplicate code *) moves the internal_name_resolve() to use an IP/port pair to deal with SRV RR dns replies. The namecache code also supports the IP:port syntax now as well. *) removes 'ads server' and moves the functionality back into 'password server' (which can support "hostname:port" syntax now but works fine with defaults depending on the value of lp_security()) (This used to be commit d7f7fcda425bef380441509734eca33da943c091)
2003-06-16Fix some compiler warnings.Tim Potter1-2/+0
(This used to be commit eec1758e048f38e2ac48a7dda96b90a74ec95449)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-25/+26
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-12-22merge IRIX winbind support from Samba 2.2 branchHerb Lewis1-35/+116
(This used to be commit 20c5f042e3bb79ff96a993c70b843908dcfafb65)
2001-12-12allow IRIX to build nsswitch/libnss_wins.soHerb Lewis1-12/+82
(This used to be commit 564bfd77287b3006c7246065990ca9b91f79826a)
2001-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-2/+2
and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
2001-11-23Removed TimeInit() call from every client program (except for one placeTim Potter1-1/+0
in smbd/process.c where the timezone is reinitialised. Was replaced with check for a static is_initialised boolean. (This used to be commit 8fc772c9e5770cd3a8857670214dcff033ebae32)
2001-11-19Store some path names in global variables initialized to configureMartin Pool1-1/+1
default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-17move to SAFE_FREE()Simo Sorce1-2/+1
(This used to be commit 03dc67788f68c9e01b5a82fdf43f837cb19f4608)
2001-07-04The big character set handling changeover!Andrew Tridgell1-1/+0
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-05-15Zero-fill struct hostent.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 86557d633648f279e6ceda4da38801889ca4ed95)
2001-05-15Fixed glibc crash problems with libnss_wins.soJeremy Allison1-4/+44
Jeremy. (This used to be commit c38a465bef91bc54cd3f3ce81e5a9c818f429801)
2000-10-11Converted to call lib/wins_srv.c:wins_srv_ip() instead of lp_wins_server()Christopher R. Hertel1-4/+4
when looking up the WINS server address. Please *don't* use lp_wins_server() any more! The wins_srv_ip() function has the following features: - If the WINS server was entered as a DNS name then the translation to an IP address will already have taken place. We used to do this every time a call to the WINS server was made. Ick. - The return value of wins_srv_ip() is a struct in_addr. Ready to go. - When WINS failover is fully implemented, you'll be able to enter a colon- separated list of WINS servers via the WINS SERVER parameter. Using lp_wins_server() directly will fail if this syntax is used. Chris -)----- (This used to be commit 56be7c2a49a8a918318a70843fff4e89ec10d0d3)
2000-10-09Fixes to allow wins.c to compile to allow building of libnss_wins.so.John Terpstra1-2/+11
(This used to be commit 3fb2e94c4430c570639c0e4d1caeed3a19bbd09b)
2000-07-19Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel1-4/+2
string), the wins_srv module now hands back a struct in_addr when it's called. It caches the IP address once it has been looked up. The IP is cleared (and must be looked up again) if the 'wins server' parameter is reread, or if the node is marked 'dead'. A dead node will not be re-tried for 10 minutes (per a #define in wins_srv.c). As it was, the code was reading the WINS server name or IP directly from lp_wins_server. That's okay, except that if the value was expressed as a name, then a DNS lookup would be done every time the client wanted to talk to the server. I still need to work out the implications of failover regarding the 'unicast subnet' list. Chris -)----- (This used to be commit 73aa188320fd3bf10b5dfc057323f40aff2c13bd)
2000-07-19First cut toward adding WINS server failover.Christopher R. Hertel1-1/+1
*Note: failover doesn't actually work yet!* It's just that the code I'm adding provides all of the pieces necessary. I do have one big question. Something that I'll have to ask Jeremy, I'm thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to set up the Unicast subnet. ...so what happens if the WINS server changes? My guess is either: a) nothing. b) I'd have to change the unicast subnet entry whenever the WINS server changes. Urq. BTW, the lp_wins_server() function no longer returns the WINS server name or IP. It returns the list of WINS servers entered in smb.conf. To get the currently 'live' WINS server, use the wins_srv() function. Fun, eh? Chris -)----- (This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d)
2000-01-07remove scope parameter here tooAndrew Tridgell1-3/+3
(This used to be commit c78deb1d229bd301be483a256f1fd2047cec6120)
1999-12-17added basic nsswitch support - this allows you to use a "wins" entryAndrew Tridgell1-0/+129
in a /etc/nsswitch.conf hosts line. Only tested on RH6.1, but should work on a broad range of Linux distributions. It could probably be made to work with Solaris pretty easily. It does not build by default. Build it with "make nsswitch" (This used to be commit 4058eb5bffeec539f71786580376419ea5749351)