summaryrefslogtreecommitdiff
path: root/source3/nmbd
AgeCommit message (Collapse)AuthorFilesLines
1998-06-09Fixed compile problem after make proto.Jeremy Allison1-3/+2
Chris's reformating of the (rather long named function) find_name_for_remote_broadcast_subnet (moving the function name onto a line on it's own) caused the proto awk script to miss it. Jeremy. (This used to be commit 17c758687f0ec6040633bc1815a52627b7e15f02)
1998-06-09This is a first step toward moving long namelists into a database. IChristopher R. Hertel11-222/+292
split the name_record structure into pieces. The goal is that the key (the name) be separate from the data associated with the key. Databases such as gdbm store information in [key,content] pairs. There is no functional change in with this update. It's just a step in the direction that Jeremy and I have been discussing. Chris -)----- (This used to be commit e420a4bd7d368a0e910893400fb7b46ab8694a08)
1998-06-08Added code to add the Samba names onto the remote_broadcast subnet,Jeremy Allison2-5/+11
as NT 4.x does directed broadcast node status requests for the *<0x0> name. Jeremy. (This used to be commit 8c6fe8870a72271a6acd1633efc362c59e283e19)
1998-06-08Cosmetic. Added a cast to (void) to a call to add_name_to_subnet() sinceChristopher R. Hertel1-5/+5
the return value was being ignored anyway. SGI's lint said: function returns value which is sometimes ignored add_name_to_subnet Chris -)----- (This used to be commit ae706bff10cc77f06b8069e637ec9768d6a46966)
1998-05-19Forgot to add the initialize_password_db() call to nmbd also.Jeremy Allison1-0/+3
Jeremy. (This used to be commit 2f9f0a88e8220575edb43a9945d0b60829efa840)
1998-05-18chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1-1/+1
ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy. (This used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0)
1998-05-12includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1-1/+1
have vsnprintf. locking_slow.c: slight tidy. make_smbcodepage.c: Use safe_strcpy instead of pstrcpy. nmbd_winsserver.c: Use pstrcpy instead of fstrcpy. smbmount.c: Fixed reported bug. util.c: Removed old fstrcpy/fstrcat functions. Jeremy. (This used to be commit f257d2e4bafd3944cca737699913a8d868279ca6)
1998-05-12This is a security audit change of the main source.Jeremy Allison9-35/+35
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-05-11changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell2-9/+9
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
1998-05-07created "passdb.c" which is an interface point to (at present) eitherLuke Leighton1-1/+1
smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP). _none_ of the functions in ldap.c or smbpass.c should be called directly: only those in passdb.c should be used. -DUSE_LDAP is unlikely to compile at the moment. (This used to be commit 57b01ad4ffb14ebd600d4e66602b54ed987f6106)
1998-05-05genrand.c: SGI compile warning fix.Jeremy Allison3-3/+3
ipc.c: Fix for duplicate printer names being long. loadparm.c: Set bNetWkstaUserLogon to false by default - new code in password.c protects us. nmbd_logonnames.c: nmbd_namequery.c: nmbd_namerelease.c: Debug messages fix. password.c: SGI compile warning fix, fix for tcon() with bNetWkstaUserLogon call. reply.c: SGI compile warning fix. server.c Debug messages fix. smbpass.c: Fix for incorrect pointer. Jeremy. (This used to be commit 567d3f838988cafab4770fce1cf68b73085e6c71)
1998-04-25This looks like a big change but really isn't.Jeremy Allison16-139/+135
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-20Fixed bug that John found in WINS server code. When nmbd as a WINSJeremy Allison3-9/+99
server is sending out a name_query after a WACK, it needs to send a packet with recursion_desired = 0 (yes Luke, you were right all along :-). If it doesn't then if it's talking to itself then the query packet ends up back in the WINS server instead of in the client side code. Makefile: Changed proto generation to stop including NMBDOBJ twice. nmbd_namequery.c nmbd_packets.c nmbd_winsserver.c: Added extra query_name_from_wins_server() code. Jeremy. (This used to be commit c5ca05c29546053a771f4ea3ef850efb3be970ea)
1998-04-15ipc.c: Fix for printer queue spinning with Win95.Jeremy Allison1-0/+2
nmbd.c: Fix for always overwriting log despite append setting. smb.h: Addition of last time password changed entry to account info. smbpass.c: Changes to support last time changed field in smbpasswd file. smbpasswd.c: Changes to support last time changed field in smbpasswd file. util.c: Fix for always overwriting log despite append setting. Jeremy. (This used to be commit eb4fe9ecdf539209efab07dc992447ea7370cf93)
1998-04-14Modified interfaces to getting smb password entries fromJeremy Allison1-1/+1
get_smbpwd_entry (now an internal function to smbpass.c) to a more UNIX-like : getsmbpwnam() - get entry by name. getsmbpwuid() - get entry by uid. Changed the type returned by the smbpasswd enumeration functions to be a void * so that people don't come to depend on it being a FILE *. These abstractions should make it much easier to replace the smbpasswd file with a better backend in future. Other files changed are to match the above changes. Jeremy. (This used to be commit 1161cfb7f2b0d5a6d3e2b524a14a6f325ce70efb)
1998-04-13Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison7-13/+13
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-04-02We were missing a case switch in announcement processing - weJeremy Allison1-0/+17
were loggin a become backup request with debug log level of 0 - thus producing lots of annoying error messages. Now handle this explicitly. Jeremy. (This used to be commit 0f4914b870b0dfa876ac47d29f3a1b3736a3d698)
1998-03-16Adding the same change as was added to 1.9.18 branch to add theJeremy Allison2-74/+10
"name resolve order" parameter. source/Makefile: Re-ordered link for name resolve order code. source/clientgen.c: source/clientutil.c: Added calls to resolve_name(). source/includes.h: Added HPUX zombie fix. source/loadparm.c: Added new name resolve order parameter. source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name() function requested by John. source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server. source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c source/password.c: Call resolve_name() to lookup security=server name. source/reply.c: source/time.c: source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au. source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause problems on many systems. Jeremy. (This used to be commit 7f118970da7c43eaddcf92dc056d3e849f1e7d5c)
1998-03-14added the ability to start/stop the server from SWAT.Andrew Tridgell1-36/+3
I needed to modify the way the pidfile is handled in nmbd and smbd to do this. Jeremy, you may wish to look at what I've done as it probably breaks the Whistle use of pidfiles. In particular I've removed the -f option and instead smbd and nmbd always create a pidfile in the lock directory. (This used to be commit 20bb22d61b986d2036c681fc33db60f2b2b3c1c7)
1998-03-14another makeover of loadparm to support new stuff in swat andAndrew Tridgell1-1/+1
testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a)
1998-03-11"For I have laboured mightily on Luke's code, and hath brokenJeremy Allison3-5/+14
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-03-03Change the multibyte character set support so thatJeremy Allison2-1/+24
Kanji support is one case of multibyte character support, rather than being a specific case in single byte character support. This allows us to add Big5 Chinese support (code page 950) and Korean Hangul support (code page 949) at very little cost. Also allows us to easily add future multibyte code pages. Makefile: Added codepages 949, 950 as we now support more multibyte codepages. asyncdns.c: Fixed problem with child being re-spawned when parent killed. charcnv.c charset.c client.c clitar.c kanji.c kanji.h smb.h util.c loadparm.c: Generic multibyte codepage support (adding Big5 Chinese and Korean Hangul). nmbd.c: Fixed problem with child being re-spawned when parent killed. mangle.c: Modified str_checksum so that first 15 characters have more effect on outcome. This helps with short name mangling as most 'long' names are still shorter than 15 chars (bug was foobar_mng and foobar_sum would hash to the same value, with the modified code they hash differently. Jeremy. (This used to be commit 299016338cfb47f0c585875ef9b468121fcee97d)
1998-02-26Makefile, password.c, includes.h: Added KRB4 patches from Johan Hedin ↵Jeremy Allison1-1/+16
<johanh@fusion.kth.se> nmbd_packets.c: Patch for aliased interfaces from Daniel Haun <dhaun@ecf2.puc.edu>. Jeremy. (This used to be commit 60f6302b1972e49159bf6e1a838e691268e4399c)
1998-02-26Code to work around a bug in FTP OnNet software NBT implementation.Jeremy Allison1-0/+16
They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e> names and *don't set the group bit*. Jeremy. (This used to be commit 1feb54e1ba27ab8aba2df4ebef4df010ca980f12)
1998-02-24Fixed bug reported by Janne.Harju@nmp.nokia.com. When used in broadcastJeremy Allison2-7/+35
only mode nmbd was not reporting WORKGROUP<0> and WORKGROUP<1e> names to a unicast node status query (although it was registering these names on the network). Also tidied up code in nmbd_mynames.c so that all known IP addresses are registered in the unicast subnet in this case rather than just the first, as was previously done. Jeremy. (This used to be commit eb71c5edcbb983ed4a1b0f57139bd66b671c67fa)
1998-02-24Fixed bug where second response message was being printed with theJeremy Allison1-1/+1
wrong IP address. This confused a lot of people (including me :-). Jeremy. (This used to be commit 0f4080d3f076db58917d13787a282e96ba59a053)
1998-02-24nmbd_incomingdgrams.c: Fix for typo.Jeremy Allison2-3/+3
nmbd_sendannounce.c: Remote announcement was announcing to the wrong name ! nmblookup.c: Fix for substitutions not seeing hostname. testparm.c: Fix for substitutions not seeing hostname. wsmbstatus.c: Fix for substitutions not seeing hostname. util.c: Change read_udp_socket to use sockaddr_in rather than dubiously messing around with an opaque data type (sockaddr). Jeremy. (This used to be commit 776ccf5c0641b5aa300236c2612b5f2761d1179f)
1998-02-20nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison2-2/+30
<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-02-12make the initial logfile names consistent. This should mean that smbdAndrew Tridgell1-1/+1
starts with log.smb and nmbd starts with log.nmb. It also gets rid of the "log." when using the log.%m construct as %m expands to smb before a client connects. (This used to be commit b7712a0a6d0afeef6239d5af61cba677eebb247b)
1998-01-29Makefile: Fix for OSF1 typo.Jeremy Allison4-2/+52
asyncdns.c: Fixes that went into 1.9.18p2 - allow unclocking of sigterm. chgpasswd.c: char -> unsigned char fixes. includes.h: AIX fix to get prototype for inet_ntoa. local.h: Tune size of shared memory based on MAX_OPEN_FILES. nmbd_mynames.c: Fix for nmbd repeated refresh bug. nmbd_responserecordsdb.c: Fix for nmbd repeated refresh bug. nmbd_winsserver.c: Fix for multi-homed registration optimisation. smb.h: Moved default shared memory size to local.h Jeremy. (This used to be commit fa5466805685d461564054d7d9947948fc56ae93)
1998-01-23nmbd.c, server.c: Added #ifndef MEM_MAN around code that sets the SIGUSR1Jeremy Allison1-0/+4
and SIGUSR2 signals. This allows the MEM_MAN code to be compiled in and the memory debug feature to be used with SIGUSR1. Jeremy. (This used to be commit 43ef7e3cb5bb971ff6ddf8230b08995e55b7c6e1)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison26-69/+69
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-21Fixed send_mailslot code where src_type was always being set to zero.Jeremy Allison1-1/+1
Fix found by Bernhard Laeser <nlaesb@ascom.ch>. Jeremy. (This used to be commit 303b5a79c83246e1895f9478e187610addfd2862)
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 Allison3-12/+24
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)
1998-01-07includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.Jeremy Allison3-9/+8
interface.c: Added netmask fix. nmbd_nameregister.c: Fixed unitialised variable warnings. nmbd_winsproxy.c: Fixed unitialised variable warnings. nmbd_winsserver.c: Fixed DEC warnings. print_svid.c: Fixed DEC warnings. printing.c: Added LPRng fixes. Jeremy. (This used to be commit 28aff043c4a3693a0c20e87c7ce11eb4bf285b78)
1998-01-03added timestrings to become and unbecome domain/local master browserHerb Lewis2-12/+13
messages. (This used to be commit 5e7e3d18b51e1eb949bc793d3106a17d8e65a1af)
1997-12-26fixed another couple of minor type errors (they could cause incorrectAndrew Tridgell1-4/+4
output but not a core dump) (This used to be commit 4dc66214a0cdf16e48cca961914fae37b3762330)
1997-12-26fixed a couple of illegal uses of scanf() in the nmbd wins code. TheyAndrew Tridgell1-6/+6
caused a core dump under IRIX when compiled with -64. In general you cannot assume things about variable sizes. In particular sizeof(time_t) may not equal sizeof(long) and sizeof(uint16) may not equal sizeof(short). There are probably other bugs like this. We'll need to check all format statements for use of %ld, %hx etc. In general these should not be used unless you have an explicit cast to the appropriate type. (This used to be commit 6ea907e78672558d470e9a819982940a9228e2fa)
1997-12-26use _exit to exit a childAndrew Tridgell1-6/+2
(This used to be commit 992b1cbc143be910d9b8e65afdc82c43d33650a5)
1997-12-24This is actually Jeremy, working as Herb :-).Herb Lewis1-0/+22
Fixed bug where, when server is shut down it would always do a lm announce broadcast of shutdown. This could cause other nmbd's to think that they have seen an lm announce broadcast and start doing it themselves. Changed to only send lm announce shutdown if admin configured it or one was seen on the subnet. Jeremy. (This used to be commit 64c8111574ff9fa00d5b43b146ae4d6f6bdf0565)
1997-12-24Added SIGUSR1/SIGUSR2 handling.Jeremy Allison2-3/+37
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10) sending a SIGUSR2 will lower it (lower limit at zero). Jeremy. (This used to be commit 6a3cb6f4b46129e4d799a24d34cdb9460ed8910f)
1997-12-24nmbd_elections.c: Added new parameter to dump_workgroups call.Jeremy Allison4-56/+116
nmbd_incomingdgrams.c: Deal with announcements with servertype == 0 - these are announcements that a machine is shutting down and must be treated differently. nmbd_serverlistdb.c: Exposed remove_server_from_workgroup as external. Added code to dump out workgroups on signal correctly. nmbd_workgroupdb.c: Added new parameter to dump_workgroups call. Jeremy. (This used to be commit f7591109b968c66012af5e9fe818bba8e6f1cf23)
1997-12-24Finally added the code Andrew wanted that will allow a Samba domainJeremy Allison3-1/+211
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-23architecture.doc: Re-added since I lost it (sorry Dan :-).Jeremy Allison2-2/+2
nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes. Jeremy. (This used to be commit f5dfc8913bcce71f14b59c5ed8415b0f54b58e6c)
1997-12-18kanji.h: Fixed problems with re-definitions of strchr and others on AIX.Jeremy Allison1-2/+4
nmbd_nameregister.c: Applied fix found by "Eloy A. Paris" <eparis@ven.ra.rockwell.com> (don't re-use lists after you have freed them :-). Jeremy. (This used to be commit bcfcc39a2752de0fb35b419d005bb1a86fd15fea)
1997-12-16WHATSNEW.txt - updated for 1.9.18alpha13.Jeremy Allison1-0/+6
docs/smb.conf.5: Removed unused NTDOMAIN params. Added new params. source/loadparm.c: Put #ifdef NTDOMAIN around unused params. source/nmbd_become_lmb.c: Removed check for workgroup name in lmb name. Jeremy. (This used to be commit 5136c5ec119968b39e2cf9d7f3e6836d9286a51f)
1997-12-16Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison6-13/+341
Also added code to stop old Samba servers that announce the workgroup name as master browser name when they are a local master browser. Jeremy. (This used to be commit 3605da055737e2cc0fbfffe7772721943a5be8bd)
1997-12-16nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI whereJeremy Allison4-5/+72
they do host announcements to LOCAL_MASTER_BROWSER_NAME<00> rather than WORKGROUP<1d>. nmbd_incomingrequests.c: Deal with WINS_PROXY_NAME issues - don't reply with that name if it's the same broadcast net. nmbd_serverlistdb.c: Stopped writing "Unknown" for local master browsers we don't know. nmbd_winsproxy.c: Deal with WINS_PROXY_NAME issues - don't reply with that name if it's the same broadcast net. Jeremy. (This used to be commit 5adfff94c9020bd57f84ccbc8fba5b1d8d1615af)
1997-12-14allow name_type 0x20 as well as name_type 0x0 in dns proxyingAndrew Tridgell1-1/+2
(This used to be commit be8a40487c128947cead19a43cf2f983e9543305)