summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_packets.c
Commit message (Collapse)AuthorAgeFilesLines
* r13887: Fix coverity bug CID #94. mem leak on error codepath.Jeremy Allison2007-10-101-0/+2
| | | | Jeremy.
* r13884: Fix coverity CID #95. Resource leak on error path.Jeremy Allison2007-10-101-0/+2
| | | | Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-2/+2
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r5082: Don't blindly copy question rr_type and class, set correctly as requiredJeremy Allison2007-10-101-10/+7
| | | | | by rfc1002. Jeremy.
* r5077: Use correct type for rr record on negative name query reply.Jeremy Allison2007-10-101-0/+3
| | | | Jeremy.
* r5076: Ensure that WINS negative name query responses and WACK packetsJeremy Allison2007-10-101-1/+10
| | | | | | | use the correct RR type of 0xA instead of reflecting back what the query RR type was (0x20). See rfc1002 sections 4.2.14 and 4.2.16. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-5/+5
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r3877: Final (I hope :-) fix for #2050 from Lars Müller for select maxfd's.Jeremy Allison2007-10-101-16/+6
| | | | Jeremy.
* r3864: Fix from Lars Müller <lmuelle@suse.de> for bug #2050.Jeremy Allison2007-10-101-3/+19
| | | | | Make nmbd use maxfd+1 in select also. Jeremy.
* r2224: Make nmbd more robust against bad netbios packets.Jeremy Allison2007-10-101-6/+38
| | | | Jeremy.
* Use "unix netbios name" type unstring - 64 bytes long to manipulate netbiosJeremy Allison2004-03-151-2/+2
| | | | | | names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to expand to utf8 size on read. Jeremy.
* Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison2004-03-131-4/+4
| | | | | | | | | | (MORIYAMA Masayuki). Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name when represented in dos charset (ie. cp932). So go back to using fstrings for these but translate into nstrings (ie. 16 byte length values) for transport on the wire. Jeremy.
* Fix for bug #771. Fix packet length for browse list reply.Jeremy Allison2003-11-051-1/+1
| | | | Jeremy.
* Fix the character set handling properly in nmbd. Also fix bug whereJeremy Allison2003-08-271-1316/+1183
| | | | | | | iconv wasn't re-initialised on reading of "charset" parameters. This caused workgroup name to be set incorrectly if it contained an extended character. Jeremy.
* NMBD string parinoia and memcpy() parinoia fixes from HEAD.Andrew Bartlett2003-03-181-5/+10
| | | | Andrew Bartlett
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-2/+2
| | | | | | warnings. (Adds a lot of const). Andrew Bartlett
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-8/+6
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* sync 3.0 branch with headJelmer Vernooij2002-08-171-3/+22
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-158/+176
|
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-1/+1
| | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-1/+1
| | | | Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-2/+2
|
* Mismatched format and args.Jeremy Allison2001-04-271-1/+1
| | | | Jeremy.
* More paranioa fixes against nmbd lengths.Jeremy Allison2001-04-251-7/+7
| | | | Jeremy.
* Fix bad length in dgram.Jeremy Allison2001-04-241-0/+7
| | | | Jeremy.
* Patch for nmbd core dump in printing debug packets. No length check.Jeremy Allison2001-04-241-3/+5
| | | | Jeremy.
* We only want to mark mailslot packets as loopback packets if they are toRichard Sharpe2001-01-031-1/+1
| | | | | | the DGRAM_PORT, since we want to actually send those to other ports. They might be for the client library running on the Samba server!
* Make the use of generate_name_trn_id conform to the usage elsewhere ...Richard Sharpe2001-01-021-1/+1
|
* Comment out unused generate_name_trn_id ...Richard Sharpe2001-01-021-1/+1
|
* - 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.