summaryrefslogtreecommitdiffstats
path: root/source/nmbd
Commit message (Collapse)AuthorAgeFilesLines
...
* I've replaced the linked list used to manage the subnet namelists with aChristopher R. Hertel1998-06-105-181/+229
| | | | | | | | | | | | | | 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 -)-----
* Fixed compile problem after make proto.Jeremy Allison1998-06-091-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 is a first step toward moving long namelists into a database. IChristopher R. Hertel1998-06-0911-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 -)-----
* Added code to add the Samba names onto the remote_broadcast subnet,Jeremy Allison1998-06-082-5/+11
| | | | | as NT 4.x does directed broadcast node status requests for the *<0x0> name. Jeremy.
* Cosmetic. Added a cast to (void) to a call to add_name_to_subnet() sinceChristopher R. Hertel1998-06-081-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 -)-----
* Forgot to add the initialize_password_db() call to nmbd also.Jeremy Allison1998-05-191-0/+3
| | | | Jeremy.
* chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1998-05-181-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.
* includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don'tJeremy Allison1998-05-121-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 is a security audit change of the main source.Jeremy Allison1998-05-129-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.
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-112-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.
* created "passdb.c" which is an interface point to (at present) eitherLuke Leighton1998-05-071-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.
* genrand.c: SGI compile warning fix.Jeremy Allison1998-05-053-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 looks like a big change but really isn't.Jeremy Allison1998-04-2516-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.
* Fixed bug that John found in WINS server code. When nmbd as a WINSJeremy Allison1998-04-203-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.
* ipc.c: Fix for printer queue spinning with Win95.Jeremy Allison1998-04-151-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.
* Modified interfaces to getting smb password entries fromJeremy Allison1998-04-141-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.
* Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1998-04-137-13/+13
| | | | | | with gcc. (Not a big change although it looks like it :-). Jeremy.
* We were missing a case switch in announcement processing - weJeremy Allison1998-04-021-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.
* Adding the same change as was added to 1.9.18 branch to add theJeremy Allison1998-03-162-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.
* added the ability to start/stop the server from SWAT.Andrew Tridgell1998-03-141-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.
* another makeover of loadparm to support new stuff in swat andAndrew Tridgell1998-03-141-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
* "For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1998-03-113-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.
* Change the multibyte character set support so thatJeremy Allison1998-03-032-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.
* Makefile, password.c, includes.h: Added KRB4 patches from Johan Hedin ↵Jeremy Allison1998-02-261-1/+16
| | | | | | | <johanh@fusion.kth.se> nmbd_packets.c: Patch for aliased interfaces from Daniel Haun <dhaun@ecf2.puc.edu>. Jeremy.
* Code to work around a bug in FTP OnNet software NBT implementation.Jeremy Allison1998-02-261-0/+16
| | | | | | | They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e> names and *don't set the group bit*. Jeremy.
* Fixed bug reported by Janne.Harju@nmp.nokia.com. When used in broadcastJeremy Allison1998-02-242-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.
* Fixed bug where second response message was being printed with theJeremy Allison1998-02-241-1/+1
| | | | | wrong IP address. This confused a lot of people (including me :-). Jeremy.
* nmbd_incomingdgrams.c: Fix for typo.Jeremy Allison1998-02-242-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.
* nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison1998-02-202-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.
* make the initial logfile names consistent. This should mean that smbdAndrew Tridgell1998-02-121-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.
* Makefile: Fix for OSF1 typo.Jeremy Allison1998-01-294-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.
* nmbd.c, server.c: Added #ifndef MEM_MAN around code that sets the SIGUSR1Jeremy Allison1998-01-231-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 is *not* a big change (although it looks like one).Jeremy Allison1998-01-2226-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.
* Fixed send_mailslot code where src_type was always being set to zero.Jeremy Allison1998-01-211-1/+1
| | | | | Fix found by Bernhard Laeser <nlaesb@ascom.ch>. Jeremy.
* Fixed bug found by Bernhard Laeser where we are announcing to the wrongJeremy Allison1998-01-201-1/+1
| | | | | DMB name. Jeremy.
* docs/Support.txt: Removed consultant.Jeremy Allison1998-01-093-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.
* includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.Jeremy Allison1998-01-073-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.
* added timestrings to become and unbecome domain/local master browserHerb Lewis1998-01-032-12/+13
| | | | messages.
* fixed another couple of minor type errors (they could cause incorrectAndrew Tridgell1997-12-261-4/+4
| | | | output but not a core dump)
* fixed a couple of illegal uses of scanf() in the nmbd wins code. TheyAndrew Tridgell1997-12-261-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.
* use _exit to exit a childAndrew Tridgell1997-12-261-6/+2
|
* This is actually Jeremy, working as Herb :-).Herb Lewis1997-12-241-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.
* Added SIGUSR1/SIGUSR2 handling.Jeremy Allison1997-12-242-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.
* nmbd_elections.c: Added new parameter to dump_workgroups call.Jeremy Allison1997-12-244-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.
* Finally added the code Andrew wanted that will allow a Samba domainJeremy Allison1997-12-243-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.
* architecture.doc: Re-added since I lost it (sorry Dan :-).Jeremy Allison1997-12-232-2/+2
| | | | | nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes. Jeremy.
* kanji.h: Fixed problems with re-definitions of strchr and others on AIX.Jeremy Allison1997-12-181-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.
* WHATSNEW.txt - updated for 1.9.18alpha13.Jeremy Allison1997-12-161-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.
* Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison1997-12-166-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.
* nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI whereJeremy Allison1997-12-164-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.