summaryrefslogtreecommitdiffstats
path: root/source/nmbd
Commit message (Collapse)AuthorAgeFilesLines
...
* replace getpass() with getsmbpass() if getsmbpass.c compilesAlexandre Oliva1998-09-211-1/+1
|
* major autoconf clean-upAlexandre Oliva1998-09-211-0/+1
| | | | fix problems in builds with srcdir!=builddir
* oops ... I got the filenames wrong in my cleanup of the wins databaseAndrew Tridgell1998-09-181-1/+2
| | | | | | | save, so it started saving weird filenames (from an unitialised fstring). chaos reigns!
* nmbd/nmbd_winsserver.c: Fixed printf style warning.Jeremy Allison1998-09-181-1/+1
| | | | | script/mkproto.awk: Added SMB_BIG_UINT. Jeremy.
* configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1998-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy.
* fixed another potential fork bomb where the wins file becomesAndrew Tridgell1998-09-172-0/+5
| | | | non-writeable for some reason.
* fixed the nmbd fork bomb. It was a silly mistake, asAndrew Tridgell1998-09-171-0/+3
| | | | | expected. wins_write_database() didn't exit after doing its stuff, so when it returned you had two copies of nmbd :)
* fixed a typo in my last commitAndrew Tridgell1998-09-171-1/+1
|
* fixed a potential problem with wins_write_database() child processes.Andrew Tridgell1998-09-173-13/+13
| | | | | | | | | In sig_term() we were calling wins_write_database(0) which would fork a child. This child might then get killed by the same process killing off the parent. That process would then fork another child etc. The solution is to pass a "background" flag to wins_write_database(0) and only fork if this is set.
* fixed a bug in the wins database writer that caused the database to beAndrew Tridgell1998-09-101-3/+11
| | | | | | written continuously rather than once every 5 seconds (at most). also changed it to 20 seconds :)
* Copyright notices written to debug logs are now through 1998.Christopher R. Hertel1998-09-091-1/+1
| | | | Chris -)-----
* tridge the destroyer returns!Andrew Tridgell1998-09-056-168/+10
| | | | | | | | | | | | | | | | | | | | | | prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static?
* we are never interested in SIGPIPE so just ignore (block) itAndrew Tridgell1998-09-021-12/+2
| | | | always. Don't even install a handler.
* I looked at the refresh issue a bit more and discovered that SambaAndrew Tridgell1998-08-311-3/+4
| | | | | | | also doesn't switch to a registration if a refresh fails, instead the name is removed! This makes it even more imortant that a Samba WINS server accepts refresh requests as registration requests if the name is not registered. I've gone ahead and implemented this.
* minor fixes to the DMB<->DMB sync code. We now get the dmb name fromAndrew Tridgell1998-08-311-5/+10
| | | | the local_master name on the unicast subnet if it is unknown.
* I realised that my DMB<->DMB sync code has the property that theAndrew Tridgell1998-08-312-2/+20
| | | | | | | | | 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.
* set a maximum name refresh time of 20 minutes.Andrew Tridgell1998-08-312-3/+3
| | | | | | | | | | The previous code was strictly correct, but not very practical. self names were only refreshed every 3 days. I hit a situation where the Samba WINS server was restarted after deleting wins.dat and didn't notice some remote subnets (also running Samba). I realised that the complete database wouldn't have been rebuilt for 3 days, which is way too long. In order to recover from WINS restarts we need a much shorter maximum refresh time.
* bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1998-08-314-16/+16
|
* added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1998-08-306-21/+25
| | | | the correct port in environments like ip masq.
* a couple of debug linesAndrew Tridgell1998-08-301-0/+2
|
* finished the asynchronous browse synchronisation code. It even seemsAndrew Tridgell1998-08-303-141/+337
| | | | | | | | 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)
* we we have successfully done a query on *<1b> from a wins server andAndrew Tridgell1998-08-301-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.
* changed the way that name query records are sorted in replies. TheyAndrew Tridgell1998-08-302-36/+9
| | | | | are now sorted by the number of common leading bits in the IP address with the address of the querying host.
* include our netbios names list and our workgroup in the wins.dat hashAndrew Tridgell1998-08-301-2/+22
|
* changed the format of the wins.dat file slightly.Andrew Tridgell1998-08-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | It now has a line like this: VERSION 1 251152 the first number is a version #define in nmbd_winsserver.c and will be used if we ever have to change the format again. The second number is a hash of the current interfaces setting. It is used to detect the case where nmbd is restarted on a machine after the IP of the machine has changed (or the interfaces list has changed in any way). When that happens we need to discard the old wins.dat cache or you end up with chaos. This has bitten quite a few people, they find that when they move a machine it continues using the old IP for some things for the next week until the wins entries time out! I've checked, and the old nmbd can handle the new format, although it does spit out a spurious error message about the VERSION line. So users can safely run 2.0alpha then switch back to 1.9.18 without problems.
* added some defensive programming to nmbd. This mostly means zeroingAndrew Tridgell1998-08-309-13/+29
| | | | | | | | 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.
* don't exit on a SIGPIPEAndrew Tridgell1998-08-291-2/+1
|
* This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison1998-08-281-1/+1
| | | | | | | | | | | | | | correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy.
* nmbd would core dump if a large number of netbios aliases is set. TheAndrew Tridgell1998-08-281-2/+3
| | | | | | | problem was a buffer overflow in process_node_status_request(). this really points out a general problem is allocating MAX_DGRAM_SIZE packets on the stack in nmbd. There must be a better way.
* nmbd and smbd had different behavior with respect to log files. nmbd wouldChristopher R. Hertel1998-08-211-5/+11
| | | | | | | | | | | | | | | default to overwrite and smbd would default to append. Also, the -a option (actually a toggle, such that "-a -a" would set the default) was documented as append mode for nmbd, and *overwrite mode* for smbd. nmbd now defaults to append mode, to match smbd. The -a option now always means append, and I've added the -o option to both, meaning overwrite. Note that the change to nmbd's default behavior may confuse some people. I've not seen anything about 2.0.0 changes in the WHATSNEW.txt file. Where would I document a change like this? Chris -)-----
* configure: Changes for extra headers.Jeremy Allison1998-08-152-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-146-6/+8
| | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep.
* Quick fix for a small problem. If you run 'nmbd -?' you'd get the usageChristopher R. Hertel1998-08-111-1/+2
| | | | | | | message *but the daemon would start anyway*. I've added a call to exit() in the default: case of the option processing loop. Chris -)-----
* added ignore rules for the dummy filesAndrew Tridgell1998-08-091-0/+1
|
* these dummy files are needed for autoconf processingAndrew Tridgell1998-08-091-0/+0
|
* More formatting changes. Mostly converted some DEBUG() calls to DEBUGADD()Christopher R. Hertel1998-08-033-14/+22
| | | | | | so that we wouldn't get too many timestamps. Chris -)-----
* One more minor change to the format of a DEBUG message. I broke up aChristopher R. Hertel1998-08-031-4/+9
| | | | | very long output line in become_domain_master_query_success(). Chris -)-----
* I finished removing timestring() calls from DEBUG() messages. Also wentChristopher R. Hertel1998-08-035-18/+47
| | | | | | | | | | 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 -)-----
* As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel1998-07-312-21/+46
| | | | | | | | | timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)-----
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-292-14/+12
|
* chgpasswd.c: Fixed up debug calls to stop crashes if ptsname failed.Jeremy Allison1998-07-271-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
* 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
* Converted the browser database to a ubi_dLinkList. This should reduce codeChristopher R. Hertel1998-07-242-124/+161
| | | | | size, etc. Also did a bit of work to add comments. Chris -)-----
* loadparm.c:Jeremy Allison1998-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | With apologies to Charlton Heston and Pierre Boule. "You damn fools, you finally did it". Changed default security mode to be security=user. Yes this is a big (although small in code) change. It's something we've been discussing for a while, to finally wean people off the legacy security=share mode which is *never* what you want. Jeremy. nmbd_incomingrequests.c: Bug fix for nmbd core dumps caused by overrun. Found by <samuel@public.szonline.net>. nttrans.c: More NT smb stuff. reply.c: Unlink will overwrite an existing file. Well you learn something new about POSIX every day. :-). server.c: Tidyup unreadable code. smbpasswd.c: Code to allow -U remote_username to allow ordinary users to change remote passwords if their NT username is different from their UNIX username. Patch from <torbjorn.lindh@allgon.se>. Jeremy.
* 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-293-4/+22
| | | | | | | | | 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.
* Added code to do elections when told to do so.Jeremy Allison1998-06-271-2/+9
| | | | Jeremy.
* nisppass.c: Fixed incorrect parameter usage.Jeremy Allison1998-06-277-45/+122
| | | | | | | | | | | | | | | | | | | | 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.
* clitar.c: Fixed gcc warning with comment in /* */ code.Jeremy Allison1998-06-251-12/+22
| | | | | | | nmbd_winsserver.c: Remember to free packet in multi-homed register code. Use correct query_name_from_wins_server call instead of query_name call in multihomed code. Jeremy.
* The function add_name_to_subnet(), in file nmbd_namelistdb.c, returns aChristopher R. Hertel1998-06-236-21/+24
| | | | | | | | | | | | | | pointer to the newly constructed name list entry. In most cases, this return value is ignored. The two exceptions are in asyncdns.c and nmbd_winsproxy.c. Most of the calls which ignored the return value were not cast to void, so I added the cast. This helped me sort out which calls really did use the return value. I also discovered one case, in nmbd_winsserver.c, in which the return value was being stored to a variable which, in turn, was not used. Chris -)-----