summaryrefslogtreecommitdiff
path: root/source3/libsmb/namequery.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r1326: Modification to get_dc_list to check negative cache. From "Joe ↵Jeremy Allison1-188/+203
Meadows" <jameadows@webopolis.com>. Jeremy. (This used to be commit 4cc38b8aea51b55cc449cd2144f18de7d4819637)
2007-10-10r248: Add support for printing out the MAC address on nmblookup.Richard Sharpe1-4/+11
(This used to be commit bf9f02be5fc1d09c8c08c78c3f2df23b2099ba4f)
2004-03-13Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison1-2/+2
(MORIYAMA Masayuki). Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name when represented in dos charset (ie. cp932). So go back to using fstrings for these but translate into nstrings (ie. 16 byte length values) for transport on the wire. Jeremy. (This used to be commit b4ea493599ab414f7828b83f40a5a8b43479ff64)
2004-03-13First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) toJeremy Allison1-1/+1
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c so it's readable. Jeremy. (This used to be commit 966e49a48c352563cdd7f75fe2768f2d6612ec7e)
2004-02-08Make get_dc_list static - we only ask for a sorted list externally.Andrew Bartlett1-23/+24
Andrew Bartlett (This used to be commit e10e176c83da9eda0746e0bd108c72a01a0505e8)
2004-01-13* allow dns lookups to be disabled for DOMAIN#1c (and #1b)Gerald Carter1-7/+26
names * fix some a mispelled variable name (This used to be commit bca702c97620ad8f66015d6e4b41abd4adf22076)
2004-01-09Romve debugging assertions (oops...)Andrew Bartlett1-6/+0
Andrew Bartlett (This used to be commit 7e75a6d681fc63cacc7e5caa7a04568c6019367f)
2004-01-09Add a new type of name lookup 'ads'. This seperates this from normalAndrew Bartlett1-33/+59
hostname lookups, and ensures that we don't lookup 'short' (ie NetBIOS) domain names in DNS. Andrew Bartlett (This used to be commit 35f6347a73ce7423adb78c7e95492bb6d98f4c40)
2003-12-09Make intent to return only one address clear.Jeremy Allison1-2/+2
Jeremy. (This used to be commit d3d0353baeba580d8a7a4688f847463b1b2e750c)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-1/+1
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-07-03fix bug #190; WINS server was getting marked as dead when it was not.Gerald Carter1-2/+14
(This used to be commit fa354f3ceefe53bdfd4f543559041d337b75613f)
2003-06-25large change:Gerald Carter1-371/+327
*) 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-23* s/get_dc_name/rpc_dc_name/g (revert a previous change)Gerald Carter1-2/+9
* move back to qsort() for sorting IP address in get_dc_list() * remove dc_name_cache in cm_get_dc_name() since it slowed things down more than it helped. I've made a note of where to add in the negative connection cache in the ads code. Will come back to that. * fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead of MAX_ALLOWED) * only enumerate domain local groups in our domain * simplify ldap search for seqnum in winbindd's rpc backend (This used to be commit f8cab8635b02b205b4031279cedd804c1fb22c5b)
2003-06-13Forward port the app-head changes for dc name cache into 3.0.Jeremy Allison1-14/+25
Jeremy. (This used to be commit 8bcc3116a22ce11b55a35f3363230f54bc5735fc)
2003-05-08Revert a patch that somehow slipped in...Volker Lendecke1-2/+2
Volker (This used to be commit 6cde3d4d655bbe1d81e68ec2ec7a23669ac82120)
2003-05-08This puts real netlogon connection caching to winbind. This becomesVolker Lendecke1-2/+2
important once we start doing schannel, as there would be a lot more roundtrips for the second PIPE open and bind. With this patch logging in to a member server is a matter of two (three if you count the ack...) packets between us and the DC. Volker (This used to be commit 5b3cb7725a974629d0bd8b707bc2940c36b8745e)
2003-03-05Writable string const fixes.Jeremy Allison1-1/+1
Jeremy. (This used to be commit c832e95c2f4daf175954a60f3c56420cf2f35b45)
2003-02-17Correctly check for inet_addr fail. Patch from gregor.7@osu.edu.Jeremy Allison1-2/+5
Jeremy. (This used to be commit 01f6b2694532749807aff1c2e6f338dade2d9b09)
2003-01-04Merge from HEAD - mimir's new gencache based namecache code.Andrew Bartlett1-6/+4
Andrew Bartlett (This used to be commit f79324f730c400342f445c931b0d75ff756d7cc7)
2002-12-04[merge] remove assert(count ==1) for multi-homed PDCs; CR 1277Gerald Carter1-3/+22
(This used to be commit 18799c115b05d6662350509f6662dbfceb4b71f5)
2002-12-04Doing janitorial duty for tpot - memory leak fix.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 7acf9594210f024e8d0c34259fcc990c6c76c838)
2002-12-01Fixup of ordered cleanup of get_dc_list - bug found by Dominik 'Aeneas' ↵Jeremy Allison1-27/+10
Schnitzer <dominik@schnitzer.at> Jeremy. (This used to be commit 15185ac437a6a0f53711bef035879173dbb492c6)
2002-11-23[merge from APP_HEAD]Gerald Carter1-22/+104
90% fix for CR 1076. The password server parameter will no take things like password server = DC1 * which means to contact DC1 first and the go to auto lookup if it fails. jerry (This used to be commit 016ef8b36b30846311a5321803298f8e28719244)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-8/+9
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
2002-11-06Merge of get_dc_list() api change from HEAD.Tim Potter1-13/+46
(This used to be commit 6ba7847ce2756fde94e530fd0bf2a055f3e27373)
2002-08-17sync 3.0 branch with headJelmer Vernooij1-9/+58
(This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-391/+271
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-04-04small change in name_resolve_bcast()Jean-François Micouleau1-1/+1
spotted by alexander bokovoy. it shouldn't break anything. if it's wrong, feel free to revert but explain why. J.F. (This used to be commit 638c692525c050ecdf414d461ef6b4aed3ce51db)
2002-03-19Don't try to sort a list of zero length in internal_resolve_name()Tim Potter1-1/+1
(This used to be commit 5387e4046f67a1c6ef9e98268268b06a729d5ca4)
2002-02-28Ensure that winbindd and smbd both use identical logic to find dc's.Jeremy Allison1-8/+8
Fix bug where zeroip addresses were being checked. Jeremy. (This used to be commit 8ed49fe0df201833329c17b2afe1e3aa70646558)
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)
2002-01-20Spelling fixes.Tim Potter1-0/+2
(This used to be commit e67c7c5852624bcdd5c565ea5f00b143aaf7fee4)
2002-01-17Made a debug look nicer.Tim Potter1-1/+2
(This used to be commit aca0edc819e892944c65b3feb60250994a79e88a)
2002-01-16Merge of name_status_find() debugs.Tim Potter1-5/+18
(This used to be commit cfac669017afa763100e335d1516fbed18049e00)
2002-01-11cope with direct IP addresses in resolve_name()Andrew Tridgell1-0/+5
(This used to be commit 73a59170e6fab3b0f91938a74302750915a04a7a)
2002-01-11make sure resolve_name() only returns valid IP addressesAndrew Tridgell1-4/+13
this is actually a workaround for old broken nmbd daemons, especially from Samba 2.0 (This used to be commit 12021a8de6a1dc2e43cc62f094a57c57283dfaf4)
2002-01-09Merge from appliance-head:Tim Potter1-4/+72
- put in some level 10 debugs so we can see what internal_resolve_name() is doing - remove duplicates from returned ip list of internal_resolve_name() (This used to be commit 08d2bcef1a4fc77d28bc0fa9e4ff5f3131cedea5)
2002-01-05Add a touch of constAndrew Bartlett1-1/+1
(This used to be commit b2af4372b1dac2e8f283184191fbb0231409a625)
2001-12-04Fix up funtion name, as this finds local, not domain master browsers.Andrew Bartlett1-2/+2
(as per tridge's instructions) (This used to be commit 0692d792f24f1c82c69532e50a6c4373c9a8b476)
2001-11-29I think the lookup_pdc_name() should be called lookup_dc_name() and theTim Potter1-21/+22
name_status_find() call here should look up a #1c name instead of #1d. This fixes some bugs currently with BDC authentication in winbindd and in smbd as you can't query the #1d name with the ip address of a BDC. Who is Uncle Tom Cobbley anyway? (This used to be commit 4215048f7b20a8f9e5877bdbb2f54841b2f7fa64)
2001-11-28Cross merge to make 2.2 and HEAD closer.Jeremy Allison1-9/+6
Jeremy. (This used to be commit 39f076b56cf457cc780dd30a4d3150d8bfc60d13)
2001-11-26increment the value not the pointerAndrew Tridgell1-1/+1
(This used to be commit e3698259afa79fcd318592b1d628803695406337)
2001-11-25Use "password server" for searching for BDC's also as Tim suggested.Jeremy Allison1-6/+8
Jeremy. (This used to be commit 4aca67761fbe601e27f8f768c28a11241f088bba)
2001-11-21W2K doesn't seem to respond to *#0 names in node status. Ensure nameJeremy Allison1-8/+55
lookup uses password server parameter when looking for PDCs. Jeremy. (This used to be commit 54c968913d6553c6d834b068234ab176917075eb)
2001-11-19LMHOSTSFILE is now dynamically configured too.Martin Pool1-1/+1
(This used to be commit a779710fff5fddcbf65a8ddc8e9169b586b85481)
2001-11-07Add function to add those hosts who have added msbrowse (domain master browsers)Steve French1-0/+8
(This used to be commit 3fd96a47543c268fd2828793df4006cc47a9e95b)
2001-11-04Got serious about const again.Jeremy Allison1-2/+2
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in.... They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure it's not being used correctly.... Jeremy. (This used to be commit b1930abb35dee74f858a3f7190276c418af2322b)
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-17typoSimo Sorce1-5/+2
(This used to be commit 23dc3fc7009ce40064db57d5ec8b720c7d9350a8)
2001-09-17move to SAFE_FREE()Simo Sorce1-12/+9
(This used to be commit 48fc6a6cd52e01b287030fbbf0aa08a6814c5e11)