summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_subnetdb.c
Commit message (Collapse)AuthorAgeFilesLines
* Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel2000-07-191-8/+9
| | | | | | | | | | | | | | | | | | 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-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | *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 -)-----
* Additional fix for nmbd and 127.0.0.1 interface.Jeremy Allison2000-04-031-0/+12
| | | | Jeremy.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-27/+47
|
* Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison1998-11-141-1/+1
| | | | | | | | | smbwrapper not made by default. nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include file problem...sigh. Jeremy.
* added some defensive programming to nmbd. This mostly means zeroingAndrew Tridgell1998-08-301-0/+1
| | | | | | | | areas of memory before freeing them. While doing this I also found a couple of real bugs. In two places we were freeing some memory that came from the stack, which leads to a certain core dump on many sytems.
* Cleaned up some testing code and made it more "permanent" looking. TheChristopher R. Hertel1998-07-251-38/+32
| | | | | | | NetBIOS name lists attached to the subnet records are now managed by the splay tree code. I am still working on the WINS database as a separate issue. Code is written, it's just a matter of incorporating it. CRH
* chgpasswd.c: Fix from Peter Debus <pdebus@turing.une.edu.au> for Digital UNIXJeremy Allison1998-07-021-2/+2
| | | | | | | password change core dump bug. nmbd_subnetdb.c: Make namelist_entry_compare() static. nttrans.c: More NT SMB stuff. Jeremy.
* nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.Jeremy Allison1998-06-291-0/+19
| | | | | | | | | nmbd_namelistdb.c: Added comment for Chris. nmbd_subnetdb.c: Went back to Chris's comparison code as with the make_nmb_name change it all works now. lib/rpc/server/srv_netlog.c: Ensure we return 'account disabled' for disabled accounts, rather than crashing. Jeremy.
* nisppass.c: Fixed incorrect parameter usage.Jeremy Allison1998-06-271-1/+16
| | | | | | | | | | | | | | | | | | | | nmbd_become_lmb.c: Add 'force_new_election' parameter to some functions. This allows the start of the election to be done *after* the demotion from local master browser is done. Also changed code so release of 1d name is done immediately to allow other local master to gain it. nmbd_elections.c: Ensured no elections are run until we have registered the WORKGROUP<1e> name that we must listen on to participate in elections. nmbd_incomingdgrams.c: Use force_new_election code. nmbd_namelistdb.c: Make update_name_in_namelist static. nmbd_subnetdb.c: Fix bug in comparison function. We cannot use memcmp as structure packing may make this fail. nmbd_packets.c: Ensure that we only send one release packet when sending a broadcast packet. nmbd_workgroupdb.c: Ensure we put the correct value in the ElectionCriterion field. nmblib.c: Ensure make_nmb_name zero's the struct nmb_name. Jeremy.
* I've replaced the linked list used to manage the subnet namelists with aChristopher R. Hertel1998-06-101-2/+16
| | | | | | | | | | | | | | splay tree. For short lists, this will have no noticable effect. As lists (eg. the WINS database) grow longer, the speed improvements should be quite dramatic. This change is an incremental step toward replacing the in-memory namelists with a back-end database. This change is going into the 1.9.19pre-alpha code because...well...it's pre-alpha. Please let me know if there are any problems. (Oh, as a side-effect, the wins.dat will be in sorted order. :) Chris -)-----
* This looks like a big change but really isn't.Jeremy Allison1998-04-251-1/+0
| | | | | | | | | | | It is changing the global variables "myname" and "myworkgroup" to "global_myname" and "global_myworkgroup" respectively. This is to make it very explicit when we are messing with a global (don't ask - it makes the domain client code much clearer :-). Jeremy.
* Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1998-04-131-2/+2
| | | | | | with gcc. (Not a big change although it looks like it :-). Jeremy.
* "For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1998-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy.
* nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison1998-02-201-0/+24
| | | | | | | | | | | | | <fetch@muffin.arcadia.spb.ru> to fix the fact that retransmit_or_expire_response_records() wasn't looking at the WINS subnet. server.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. smbpass.c: Fix to stop parsing failing on non-valid lines. trans2.c: Fix for volume serial number code. util.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. Fix for warnings under RH5. gcc 2.8. Jeremy.
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-3/+3
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-0/+291
back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy.