summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_subnetdb.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-02BIG patch...Andrew Bartlett1-1/+1
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-12-01Remove extra headers, and ensure that we correctly bail out of winbindd if weAndrew Bartlett1-1/+0
can't create the socket. Andrew Bartlett (This used to be commit 13b9af53bff8e42126a38f93c3bdd5b4d9b20aba)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-3/+0
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-06-27The next phase in the WINS rewrite!Andrew Tridgell1-46/+12
We now cope wiith multiple WINS groups and multiple failover servers for release and refresh as well as registration. We also do the regitrations in the same fashion as W2K does, where we don't try to register the next IP in the list for a name until the WINS server has acked the previos IP. This prevents us flooding the WINS server and also seems to make for much more reliable multi-homed registration. I also changed the dead WINS server code to mark pairs of IPs dead, not individual IPs. The idea is that a WINS server might be dead from the point of view of one of our interfaces, but not another, so we need to keep talking to it on one while moving onto a failover WINS server on the other interface. This copes much better with partial LAN outages and weird routing tables. (This used to be commit 313f2c9ff7a513802e4f893324865e70912d419e)
2002-06-19when nmbd starts up it is possible that dhcp hasn't started the localAndrew Tridgell1-4/+9
interfaces yet. Instead of giving up, nmbd will now wait for some interfaces to appear (This used to be commit 612ae5313250aec80c94782d55cbf755dd4a9a4f)
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-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-5/+6
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-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-1/+1
(This used to be commit 1446a1562b1c618c023b056f476e26da7ee3d532)
2001-08-26Same as nmbd.c. These now test wins_srv_count() instead of lp_wins_serverChristopher R. Hertel1-1/+1
to determine whether the 'wins server' parameter is set. (This used to be commit 5b975d3a9cea39e9992a9b556b8a6d9d3ec14807)
2000-07-19Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel1-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 -)----- (This used to be commit 73aa188320fd3bf10b5dfc057323f40aff2c13bd)
2000-07-19First cut toward adding WINS server failover.Christopher R. Hertel1-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 -)----- (This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d)
2000-04-03Additional fix for nmbd and 127.0.0.1 interface.Jeremy Allison1-0/+12
Jeremy. (This used to be commit 715fa7ea8cf00d72c868bed420c28a29011f53a1)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-27/+47
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1998-11-14Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison1-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. (This used to be commit 9ee8f39aed8772a05c203161b4ae6b7d90d67481)
1998-08-30added some defensive programming to nmbd. This mostly means zeroingAndrew Tridgell1-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. (This used to be commit c5e5c25c854e54f59291057ba47c4701b5910ebe)
1998-07-25Cleaned up some testing code and made it more "permanent" looking. TheChristopher R. Hertel1-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 (This used to be commit 5ba96ddde4a4b2da2cc09190f5c6f0e633852f12)
1998-07-02chgpasswd.c: Fix from Peter Debus <pdebus@turing.une.edu.au> for Digital UNIXJeremy Allison1-2/+2
password change core dump bug. nmbd_subnetdb.c: Make namelist_entry_compare() static. nttrans.c: More NT SMB stuff. Jeremy. (This used to be commit 1925a29c6b355b8358ee99e5b876b6376aa7d628)
1998-06-29nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.Jeremy Allison1-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. (This used to be commit 4ab3d1682789319965a55edb37212b7671a743bb)
1998-06-27nisppass.c: Fixed incorrect parameter usage.Jeremy Allison1-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. (This used to be commit 1fcb094ba04f01be1261ac92198c25b21b0d5ad5)
1998-06-10I've replaced the linked list used to manage the subnet namelists with aChristopher R. Hertel1-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 used to be commit 7806c453df02a89f67e7c5c8b91f24aa2274e756)
1998-04-25This looks like a big change but really isn't.Jeremy Allison1-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. (This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
1998-04-13Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1-2/+2
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-03-11"For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1-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. (This used to be commit 118ba4d77a33248e762a2cf843fb7cbc906ee6e7)
1998-02-20nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison1-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 used to be commit e58ab3bbe6e939ba678ad5482e58e0191c8dcbcb)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-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 used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-12-13This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1-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. (This used to be commit d80b0cb645f81d16734929a0b27a91c6650499bb)