summaryrefslogtreecommitdiffstats
path: root/source/libsmb/namequery.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Spelling fixes.Tim Potter2002-01-201-0/+2
|
* Made a debug look nicer.Tim Potter2002-01-171-1/+2
|
* Merge of name_status_find() debugs.Tim Potter2002-01-161-5/+18
|
* cope with direct IP addresses in resolve_name()Andrew Tridgell2002-01-111-0/+5
|
* make sure resolve_name() only returns valid IP addressesAndrew Tridgell2002-01-111-4/+13
| | | | | this is actually a workaround for old broken nmbd daemons, especially from Samba 2.0
* Merge from appliance-head:Tim Potter2002-01-091-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()
* Add a touch of constAndrew Bartlett2002-01-051-1/+1
|
* Fix up funtion name, as this finds local, not domain master browsers.Andrew Bartlett2001-12-041-2/+2
| | | | (as per tridge's instructions)
* I think the lookup_pdc_name() should be called lookup_dc_name() and theTim Potter2001-11-291-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?
* Cross merge to make 2.2 and HEAD closer.Jeremy Allison2001-11-281-9/+6
| | | | Jeremy.
* increment the value not the pointerAndrew Tridgell2001-11-261-1/+1
|
* Use "password server" for searching for BDC's also as Tim suggested.Jeremy Allison2001-11-251-6/+8
| | | | Jeremy.
* W2K doesn't seem to respond to *#0 names in node status. Ensure nameJeremy Allison2001-11-211-8/+55
| | | | | lookup uses password server parameter when looking for PDCs. Jeremy.
* LMHOSTSFILE is now dynamically configured too.Martin Pool2001-11-191-1/+1
|
* Add function to add those hosts who have added msbrowse (domain master browsers)Steve French2001-11-071-0/+8
|
* Got serious about const again.Jeremy Allison2001-11-041-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.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* typoSimo Sorce2001-09-171-5/+2
|
* move to SAFE_FREE()Simo Sorce2001-09-171-12/+9
|
* convert more code to use XFILEAndrew Tridgell2001-09-101-13/+13
|
* Make sure that if there are no interfaces, name_register_wins does notRichard Sharpe2001-09-091-0/+7
| | | | segfault.
* Fuss, fuss, fuss...Christopher R. Hertel2001-08-291-2/+2
| | | | | | | | | | Function name_status_query() performs a node status query, so it really should be called "node_status_query()" just to be consistent. Yeah, minor... but it's looking as though an overhaul of namequery.c is in order and I am trying to do the tiny changes that impact other stuff first. Chris -)-----
* Should be dbgtext, not dbg_text.Tim Potter2001-08-291-2/+2
|
* Patched to ensure that it won't break HEAD.Christopher R. Hertel2001-08-291-6/+10
| | | | | | | | | | | | | This isn't the final version, of course, I still need to get WINS failover working. This is just patched so it won't need lp_wins_server() (which I renamed to lp_wins_server_list()). I can't compile just now as something else is broken in HEAD. Let me know if this version of namequery.c causes trouble down the line. Shouldn't, as the changes are very small, but I've been known to rock the boat before. Chris -)-----
* Realloc fix.Jeremy Allison2001-08-191-3/+13
| | | | Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-4/+3
| | | | | | | 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.
* Removed silly Get_Hostbyname() wrapper as DNS names are case-insensitiveTim Potter2001-06-181-1/+1
| | | | | and the use of this function only increased timeouts when Samba queries a broken DNS server.
* Fix from "Darrin B. Jewell" <jewell@bdi.com> to allow anything other thanJeremy Allison2001-04-151-4/+12
| | | | | nmbd to talk to nmbd if it's a WINS server. Jeremy.
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | Jeremy.
* Separated reg code into interface & implementation.Jeremy Allison2001-02-251-5/+1
| | | | | libsmb/namequery.c: Removed ununsed variables. Jeremy.
* Fixes to libsmbclient so it will work when browsing real Windows systems whichRichard Sharpe2001-02-181-0/+153
| | | | | | only respond to port 138 when dealing with NetBIOS datagrams. We use the unexpected packed database.
* Merge of i18n fixes from appliance branch. Samba can now talk to a networkTim Potter2001-02-141-0/+2
| | | | | with a PDC that has international netbios name and domain name. There's still quite a bit of i18n stuff to fix though...
* Fixes from appliance-head for pdc searches.Jeremy Allison2001-01-251-18/+1
| | | | Jeremy.
* implemented a much nicer name_status() interface. It now returns aAndrew Tridgell2000-12-201-167/+122
| | | | | | | list of structures rather than the dodgy parsing code we had before this also gets smbw working correctly with no initial workgroup (using name_status_find on __MSBROWSE__ returns)
* Fixed bug found by Gerald. If a Samba server joins a domain and is setJeremy Allison2000-12-191-2/+2
| | | | | | | | to search for a DC to authenticate to using the "*" syntax than ensure that for the first hour after the password change is searches for the PDC using the 1B name not the 1C name as domain replication may not have occured. Jeremy.
* exposed the broadcast name resolution routine outside namequery.cAndrew Tridgell2000-12-111-4/+4
|
* Rolled back find NetBIOS name of PDC/BDC code as a temp fix. ThisJeremy Allison2000-10-271-1/+60
| | | | | code works :-). Jeremy.
* Fix to allow smbd to call winbindd if it is running for all group enumeration,Jeremy Allison2000-10-131-1/+1
| | | | | | | | falling back to the UNIX calls on error. This should fix all problems with smbd enumerating all users in all groups in all trusted domains via winbindd. Also changed GETDC to query 1C name rather than 1b name as only the PDC registers 1b. Jeremy.
* Replaced "\\MAILSLOT\\NET\\NETLOGON" with NET_LOGON_MAILSLOT constant.Tim Potter2000-08-251-1/+1
|
* First shot at actually *doing* WINS failover.Christopher R. Hertel2000-08-111-1/+8
| | | | | | | | | | | | | | | | | | If libsmb/namequery.c:name_query() times out while doing a non-broadcast query, I mark that WINS server 'dead'. Note that I don't try the new WINS server. I think I can get that working too. This is only for queries, not registrations. The biggest problem is that I may have to fiddle with the UNICAST SUBNET, but I need to check talk that over with someone (Jeremy?) before I hack at it. I can't actually test the above change, I'm 'fraid. I'm getting: 4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c". in head branch. Chris -)-----
* Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel2000-07-191-1/+1
| | | | | | | | | | | | | | | | | | 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 -)-----
* First cut toward adding WINS server failover.Christopher R. Hertel2000-07-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | *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 -)-----
* An improved version of the Negative Query Response fix. The earlier fixChristopher R. Hertel2000-07-121-10/+37
| | | | | | | | only did a short-cut on an rcode of 3, which is 'name not found'. This does a short-cut on any non-zero rcode. It also puts out a DEBUG message (if DEBUGLEVEL is >= 3) detailing the error. Chris -)-----
* Quick change to short-circuit WINS queries if the WINS server returns aChristopher R. Hertel2000-07-091-6/+20
| | | | | Negative Name Query Response. We should't wait through the timeouts and retry twice if we've been told "No Such Entry".
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-031-0/+63
| | | | | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. These files changed only with the addition of some support functions from TNG --jerry
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-2/+2
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-1/+1
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-1/+1
| | | | | | | | | | | | include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy.