summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_packets.c
Commit message (Collapse)AuthorAgeFilesLines
* - changed the msg_type to be an int instead of an enum so that it isAndrew Tridgell2000-09-121-11/+0
| | | | | | | easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election
* debug messages now work for nmbdAndrew Tridgell2000-09-111-82/+75
|
* the first cut of the internal messaging system.Andrew Tridgell2000-09-111-12/+0
| | | | | The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message.
* Fix for bind interfaces only sometimes picking the wrong IP addressJeremy Allison2000-08-301-2/+24
| | | | | for a name query. From Steve Langasek <vorlon@netexpress.net>. Jeremy.
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-1/+1
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-1/+1
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* the final part of the nmbd merge between head and tng - this gets theAndrew Tridgell2000-03-271-5/+4
| | | | GETDC stuff sorted out
* fixed the hanlding of recursion desired when sending packets fromAndrew Tridgell2000-03-271-23/+22
| | | | | | | | | | nmbd. It does NOT follow the rule that packets to the wins server have rec_des set (I know that we have postulated this in the past). Please don't screw with this unless you do careful testing from WinXX clients. Luke and I spent a couple of hours today getting this right (it was wrong in both TNG and HEAD)
* this looks like a big commit, but it isn't really :)Andrew Tridgell2000-01-071-7/+8
| | | | | | | | 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.
* added suppport for unexpected udp/138 packetsAndrew Tridgell2000-01-031-9/+12
| | | | | | | | | | | | | | I also fixed up the lookup_pdc_name() code so that it now works, even with a NT server that insists on replying to udp/138. The method I used to match packets was to use the mailslot string as a datagram ID. The true dgm_id doesn't work as NT doesn't set it correctly. uggh. PS: Jeremy, I had to change your code quite a bit, are you sure this worked with a Samba PDC?? The code looked broken, it got the offsets wrong in the SMB portion of the packet and filled in the IP incorrectly.
* added the unexpected packet database (unexpected.tdb)Andrew Tridgell2000-01-031-1/+2
| | | | | | | | | | | | this means "nmblookup -S" now always works, even with broken servers the database stores all unexpected replies and these can be accessed by any client. while doing this I cleaned up a couple of functions, and put in place a better trn_id generator. in most places the code got quite a bit simpler due to the addition of simple helper functions. I haven't yet put the code in to take advantage of this for pdc replies - that will be next. Jeremys pdc finding code will then work :)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-39/+80
|
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-011-1/+1
|
* - bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursionLuke Leighton1999-11-191-8/+17
| | | | | | | | desired flag MUST be set in any NBT UDP packets sent to a WINS server, else they will go to the WINS client side of the NT NetBIOS kernel instead, and will get trashed. - added \PIPE\browser server-side code.
* responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, theLuke Leighton1999-11-181-1/+1
| | | | | | | request name. modified createuser rpcclient command to examine name being added. if it ends in a $, assume that a workstation trust account is being added.
* mods to allow inter-domain trust accounts to be added to SAM databaseLuke Leighton1999-03-091-51/+4
| | | | using smbpasswd command.
* Fix bug with nmbd running wild due to recursion in ↵Jeremy Allison1998-12-171-9/+24
| | | | | | retransmit_or_expire_response_records(). Jeremy.
* Removed acconfig.h configure configure.in include/config.h.in: Made ↵Jeremy Allison1998-11-141-23/+23
| | | | | | | | | smbwrapper not made by default. nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include file problem...sigh. Jeremy.
* Okay, this is really silly but removing one space from one debug statementChristopher R. Hertel1998-10-221-1/+1
| | | | | meant that one hex dump would fit within 80 characters in lynx after HTML conversion.
* Minor change.Christopher R. Hertel1998-10-221-1/+1
| | | | | | | | The debug_browse_data() function does a hex dump of a browser packet. The last line is often not a full 16 bytes, which would miss-align the hex output. I've added the padding needed to align the hex output. Chris -)-----
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-1/+1
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* tridge the destroyer returns!Andrew Tridgell1998-09-051-8/+7
| | | | | | | | | | | | | | | | | | | | | | 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?
* added a dest_port parameter to send_mailslot() so we send replies toAndrew Tridgell1998-08-301-4/+3
| | | | the correct port in environments like ip masq.
* 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.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-1/+1
| | | | | | | | 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.
* I finished removing timestring() calls from DEBUG() messages. Also wentChristopher R. Hertel1998-08-031-5/+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 -)-----
* nisppass.c: Fixed incorrect parameter usage.Jeremy Allison1998-06-271-0/+11
| | | | | | | | | | | | | | | | | | | | 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 is a first step toward moving long namelists into a database. IChristopher R. Hertel1998-06-091-1/+1
| | | | | | | | | | | 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 is a security audit change of the main source.Jeremy Allison1998-05-121-3/+3
| | | | | | | | | | | | | | | | | | 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.
* Fixed bug that John found in WINS server code. When nmbd as a WINSJeremy Allison1998-04-201-0/+64
| | | | | | | | | | | | | 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.
* Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1998-04-131-1/+1
| | | | | | 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.
* 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.
* nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev ↵Jeremy Allison1998-02-201-2/+6
| | | | | | | | | | | | | <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 is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-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.
* 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.
* Added SIGUSR1/SIGUSR2 handling.Jeremy Allison1997-12-241-1/+18
| | | | | | 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.
* Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.Jeremy Allison1997-12-161-0/+56
| | | | | | 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 is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-0/+1775
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.