summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_browsesync.c
AgeCommit message (Collapse)AuthorFilesLines
2003-09-09sync 3.0 into HEAD for the last timeGerald Carter1-440/+405
(This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
2003-07-16trying to get HEAD building again. If you want the codeGerald Carter1-2/+6
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE (This used to be commit adb98e7b7cd0f025b52c570e4034eebf4047b1ad)
2003-05-07We used to use the name "*",0x0 here, but some WindowsJeremy Allison1-1/+9
servers don't answer that name. However we *know* they have the name workgroup#1b (as we just looked it up). So do the node status request on this name instead. Found at LBL labs. Jeremy. (This used to be commit c5b1654c28e33823a58c6447c152996a1eed1d0d)
2003-03-15String handling parinoia fixes.Andrew Bartlett1-1/+1
This patch enables the compile-time checking of strings assable by means of sizeof(). (Original code had the configure check reversed). This is extended to all safe_strcpy() users, push_string and pull_string, as well as the cli and srv derivitives. There is an attempt to cap strings at the end of the cli buffer, and clobber_region() of the speified length (when not -1 :-). Becouse of the way they are declared, the 'overmalloc a string' users of safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips some of the checks). This whole ball of mud worked fine, until I pulled out my 'fix' for our statcache. When jeremy fixes that, we should be able to get back to testing this stuff. This patch also includes a 'marker' of the last caller to clobber_region (ie, the function that called pstrcpy() that called clobber_region) to assist in debugging problems that may have smashed the stack. This is printed at smb_panic() time. (Original idea and patch by metze). It also removes some unsused functions, and #if 0's some others that are unused but probably should be used in the near future. For now, this patch gives us some confidence on one class of trivial parsing error in our code. Andrew Bartlett (This used to be commit 31f4827acc2a2f00399a5528fc83a0dae5cebaf4)
2003-03-10check a pointer before dereferencing it; not sure why userdata == NULL thoughGerald Carter1-1/+1
(This used to be commit 6fca29ddcdb111af24ee051b555ab4eec8cadd1d)
2003-03-05A couple more fixes for fstrcpy() into a malloced region. In this case it'sAndrew Bartlett1-2/+2
all perfectly legit - the region is an fstring in length, but might not always be, and it is the last peice of code to fail my automated test. Andrew Bartlett (This used to be commit 762d61b37d053568b6346e249ba7ef594320153a)
2003-01-14The last of the fstring/pstring mixups, and an extra 'static'.Andrew Bartlett1-1/+1
(This used to be commit b328b67fd8fd605636ed58ffd33cf5be3d480672)
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-10/+7
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-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-11Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison1-1/+1
Jeremy. (This used to be commit 01ff6ce4963e1daff019f2b936cef218e1c93f67)
2001-11-26Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter1-3/+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-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-1/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2000-01-07this looks like a big commit, but it isn't really :)Andrew Tridgell1-10/+7
This fixes our netbios scope handling. We now have a 'netbios scope' option in smb.conf and the scope option is removed from make_nmb_name() this was prompted by a bug in our PDC finding code where it didn't append the scope to the query of the '*' name. (This used to be commit b563be824b8c3141c49558eced7829b48d4ab26f)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-4/+4
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1998-11-14Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison1-4/+4
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-10-21Changed the debug calls to use the newer debug macros. This allowed me toChristopher R. Hertel1-59/+151
break up some very long lines in both the code and the output. The change is mostly cosmetic, but should improve log file readability. (This used to be commit fc4e0148ebf8ea45e4410224218c0c987965d36c)
1998-09-25Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison1-1/+1
Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
1998-08-31minor fixes to the DMB<->DMB sync code. We now get the dmb name fromAndrew Tridgell1-5/+10
the local_master name on the unicast subnet if it is unknown. (This used to be commit 222b6d90e09288091028f5e0435f1d4a74153f66)
1998-08-31I realised that my DMB<->DMB sync code has the property that theAndrew Tridgell1-2/+18
amount of network traffic grows as the square of the number of workgroups. It probably wouldn't have caused problems but to be safe I changed the code to use random() to decrease the probability of a DMB<->DMB sync in proportion to the number of known workgroups. This keeps the nice browse connectivity while making the traffic rise only linearly with the number of workgroups. (This used to be commit 685f4ef2e1f83ab39e91229cf53a61eecb6181eb)
1998-08-30added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1-1/+2
the correct port in environments like ip masq. (This used to be commit 7d455ee637b6ff70c95845f89d71573ca07b83f3)
1998-08-30finished the asynchronous browse synchronisation code. It even seemsAndrew Tridgell1-141/+45
to work (not a lot of testing yet though). Now we just need to deal with people worried about having more than two nmbd processes sometimes. (the async processes are created on demand for browse sync, so you'll only see more than 2 occasionally) (This used to be commit a350a54680e4170e2adf571b010ea508e7291780)
1998-08-30we we have successfully done a query on *<1b> from a wins server andAndrew Tridgell1-7/+25
then obtained a node status response we need to remember the server name of the master browser so that other browse clients asking us for a workgroup list will get a entry for the master of that workgroup. (This used to be commit 601f995ffbfa0ee477ea628d92b9660d6bdd8cbc)
1998-08-30added some defensive programming to nmbd. This mostly means zeroingAndrew Tridgell1-2/+3
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-08-03I finished removing timestring() calls from DEBUG() messages. Also wentChristopher R. Hertel1-2/+7
through and changed some DEBUG() calls to DEBUGADD() to combine output under a single timestamp. There were too many timestamps. Note that Jeremy has told me that he's working on adding a config parameter to turn timestamps off. Cool. Chris -)----- (This used to be commit 247dbc9a24987035a47f1ba4fa143b1e2c050e92)
1998-07-27chgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.Jeremy Allison1-1/+1
local.h: Kept FSTYPE_STRING as Samba for now. nmbd_browsesync.c: Added bugfix from Matt Chapman mattyc@cyberdude.com - lmb_browserlist is now a struct ubi_dlList not a struct browse_cache_record *. server.c: smb.h: uid.c: password.c: Removed attrs code - it is not used anywhere. Jeremy (This used to be commit ef1af7fe6d5c58ae57b8e4efff0729e1a315da43)
1998-07-24Converted the browser database to a ubi_dLinkList. This should reduce codeChristopher R. Hertel1-1/+3
size, etc. Also did a bit of work to add comments. Chris -)----- (This used to be commit d8b0a2104c05df957f0eb49c21388ec5a4858d98)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-1/+1
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-04-25This looks like a big change but really isn't.Jeremy Allison1-6/+6
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-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)
1998-01-20Fixed bug found by Bernhard Laeser where we are announcing to the wrongJeremy Allison1-1/+1
DMB name. Jeremy. (This used to be commit 6b3d4620c128fe1f77f579a451eac7f41a83064f)
1998-01-09docs/Support.txt: Removed consultant.Jeremy Allison1-2/+7
source/Makefile: Added Volker's comment. source/nmbd_become_lmb.c: source/nmbd_browsesync.c: source/nmbd_incomingdgrams.c: Fixed userdata alignment problems. source/mem_man/mem_man.c: source/mem_man/mem_man.h: added smb_ prefix to stop namespace collisions. Jeremy. (This used to be commit 4c8af3bc9f43b2427609cbeecb7940b1753a9a1c)
1997-12-24Finally added the code Andrew wanted that will allow a Samba domainJeremy Allison1-0/+202
master browser to use the *<1b> feature of the Samba WINS server to get a full workgroup list. nmbd.c: Added timed call to collect_all_workgroup_names_from_wins_server(). nmbd_browsesync.c: Meat of the code to implement collect_all_workgroup_names_from_wins_server(). nmbd_incomingdgrams.c: Fixed comment typo. Jeremy. (This used to be commit 1a3ab3e84a415a6d0d9b4cafb3f0f6e8cbe3fa69)
1997-12-13This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1-0/+458
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)