1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

76 Commits

Author SHA1 Message Date
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
6d210fb8a1 r22902: Add an event_context and a messaging_context to nmbd. Not used yet. 2007-10-10 12:22:06 -05:00
Jeremy Allison
2d80a96120 r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
2007-10-10 12:19:30 -05:00
Jeremy Allison
140881cfbb r22045: As Volker noticed, skip_string's last argument is
redundent. Remove it.
Jeremy.
2007-10-10 12:19:05 -05:00
Jeremy Allison
c3a565081d r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,
but I've no option.
Jeremy.
2007-10-10 12:19:01 -05:00
Jeremy Allison
dd47e0ef11 r13887: Fix coverity bug CID #94. mem leak on error codepath.
Jeremy.
2007-10-10 11:10:58 -05:00
Jeremy Allison
f4bf550b57 r13884: Fix coverity CID #95. Resource leak on error path.
Jeremy.
2007-10-10 11:10:58 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
422fb43dda r5082: Don't blindly copy question rr_type and class, set correctly as required
by rfc1002.
Jeremy.
2007-10-10 10:55:14 -05:00
Jeremy Allison
86c5548d27 r5077: Use correct type for rr record on negative name query reply.
Jeremy.
2007-10-10 10:55:14 -05:00
Jeremy Allison
ab8c924004 r5076: Ensure that WINS negative name query responses and WACK packets
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.
2007-10-10 10:55:13 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Jeremy Allison
65fc39fc38 r3877: Final (I hope :-) fix for #2050 from Lars Müller for select maxfd's.
Jeremy.
2007-10-10 10:53:23 -05:00
Jeremy Allison
e3ca22b80d r3864: Fix from Lars Müller <lmuelle@suse.de> for bug #2050.
Make nmbd use maxfd+1 in select also.
Jeremy.
2007-10-10 10:53:22 -05:00
Jeremy Allison
dd9b17abd6 r2224: Make nmbd more robust against bad netbios packets.
Jeremy.
2007-10-10 10:52:36 -05:00
Jeremy Allison
834d816caf Use "unix netbios name" type unstring - 64 bytes long to manipulate netbios
names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to
expand to utf8 size on read.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d085c94dac Fix for bug #771. Fix packet length for browse list reply.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
84ae44678a Fix the character set handling properly in nmbd. Also fix bug where
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.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
fb29caddd9 NMBD string parinoia and memcpy() parinoia fixes from HEAD.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
3928578b52 sync 3.0 branch with head 0001-01-01 00:00:00 +00:00
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 0001-01-01 00:00:00 +00:00
Jeremy Allison
3af16ade17 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
Simo Sorce
1446a1562b move to SAFE_FREE() 0001-01-01 00:00:00 +00:00
Jeremy Allison
d57feb2c85 Mismatched format and args.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
53f35a71c6 More paranioa fixes against nmbd lengths.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8bd27845f0 Fix bad length in dgram.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
eacb96396d Patch for nmbd core dump in printing debug packets. No length check.
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
05e2dd5e85 We only want to mark mailslot packets as loopback packets if they are to
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!
0001-01-01 00:00:00 +00:00
Richard Sharpe
46a3a56ecf Make the use of generate_name_trn_id conform to the usage elsewhere ... 0001-01-01 00:00:00 +00:00
Richard Sharpe
fb5798e1d9 Comment out unused generate_name_trn_id ... 0001-01-01 00:00:00 +00:00
Andrew Tridgell
f1c49ca7ce - changed the msg_type to be an int instead of an enum so that it is
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
0001-01-01 00:00:00 +00:00
Andrew Tridgell
6a503f95b1 debug messages now work for nmbd 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2a34ee95f3 the first cut of the internal messaging system.
The motivation for this system is to replace the UDP message for
oplocks, but this commit only does the "set debug level" message.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9890740121 Fix for bind interfaces only sometimes picking the wrong IP address
for a name query. From Steve Langasek <vorlon@netexpress.net>.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b28cc4163b Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
0001-01-01 00:00:00 +00:00
Jeremy Allison
148628b616 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f6b56ae93e the final part of the nmbd merge between head and tng - this gets the
GETDC stuff sorted out
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9eda2e27b7 fixed the hanlding of recursion desired when sending packets from
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)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b563be824b this looks like a big commit, but it isn't really :)
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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
32f66f4ea6 added suppport for unexpected udp/138 packets
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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
280e6359d3 added the unexpected packet database (unexpected.tdb)
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 :)
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Luke Leighton
e4d92ff9df sys_select added one more argument (read, write selectors). 0001-01-01 00:00:00 +00:00