1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-14 01:57:53 +03:00

113 Commits

Author SHA1 Message Date
Volker Lendecke
c30835b4f0 r24009: Revert to the 3.0.25 logic for parsing the client's protocols. hpisgr8
with gcc still gives timeouts which worry me.

Volker
2007-10-10 12:28:56 -05:00
Volker Lendecke
3673707f9f r24006: Some more paranoia in reply_negprot
Some hosts see the smb_bufrem(req->inbuf, p) as an unsigned int. And as
the p += strlen(p) + 2 went one beyond the buffer, this was a very
large positive. Also take the chance to add one more consistency check.
2007-10-10 12:28:55 -05:00
Volker Lendecke
bd981f5328 r24002: Convert reply_negprot to the new API 2007-10-10 12:28:54 -05:00
Volker Lendecke
befaa9713a r24001: Separate out the parsing of the client's requested protocols
This way the range checking only needs to be done once
2007-10-10 12:28:54 -05:00
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
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Volker Lendecke
4afe37d431 r23168: Move the lp_max_connections() into service.c. 2007-10-10 12:22:51 -05:00
Volker Lendecke
3452a870d5 r23167: Remove an unused parameter 2007-10-10 12:22:51 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -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
fbc569b530 r21969: Start working on the gss-side of the server negotiation.
Jeremy.
2007-10-10 12:18:54 -05:00
Günther Deschner
663514e511 r21858: Fix typo.
Guenther
2007-10-10 12:18:39 -05:00
Günther Deschner
f55e1a312e r21857: Stop pretending to be Vista in the %a macro towards Samba clients.
Guenther
2007-10-10 12:18:39 -05:00
Gerald Carter
d781eeb0e4 r21250: Partial fix for BUG 4093: Make %a expand to "Vista"
based on the flags2 values in the negprot request.

This also includes some code for testing the dialect
strings for "SMB 2.001" but this is unreliable as Vista
only sends that in the 1st negprot and caches the fact
that we don't support it.  Restartnig the WOrkstation
service on the client clears the cache.
2007-10-10 12:17:51 -05:00
Jeremy Allison
71a8b8863f r20368: Fix valgrind report of uninitialized memory
being returned (false positive). Up debug
level on "open_directory" message.
Jeremy.
2007-10-10 12:16:44 -05:00
James Peach
d6382092e7 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
2007-10-10 12:16:34 -05:00
Volker Lendecke
28fa772721 r18773: Change negprot_spnego to return a blob 2007-10-10 12:00:56 -05:00
Volker Lendecke
f1512cb43c r18772: Now that we don't have a one-byte keylength in the extended security case
anymore, we don't have to truncate the length to 255 anymore.

The test I did for this: I sent 50 times the NTLMSSP oid. With truncating
Vista said Access Denied, without truncating it liked the response.

Volker
2007-10-10 12:00:56 -05:00
Volker Lendecke
18f47130b1 r18771: Sequel to r18761: If we always set the keylen to 0 there's no point in passing
a pointer down to negprot_spnego().

Volker
2007-10-10 12:00:55 -05:00
Volker Lendecke
f19bd479ce r18761: Even if only offering NTLMSSP Windows (tested with Vista & XP) sends 0 as the
key length in the case of extended security. It does make sense because with
SPNEGO our beloved ASN1 structure gives us the length.

Next test I did to verify this: I modified the server to put in random
garbage, and W2kwks, XP, Vista and W2k3srv still talked to us.

Volker
2007-10-10 12:00:55 -05:00
Volker Lendecke
56ccfe98b2 r18760: Fix typos, remove unneeded code 2007-10-10 12:00:55 -05:00
Jeremy Allison
d357f8b335 r16397: Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.
2007-10-10 11:18:52 -05:00
Jeremy Allison
ce25e6b002 r13647: Fix for standalone Samba servers and XP clients. Reverts
part of the PocketPC bugfix. I'm trying to get someone who
has a pocketpc to test this.
Jeremy.
2007-10-10 11:10:21 -05:00
Jeremy Allison
414303bc02 r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
2007-10-10 11:05:19 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Jeremy Allison
57ed94e6e4 r10974: Get closer to trying to fix #1825 (PcoketPC spnego bug). Ensure we
set keylen to zero if no spnego.
Jeremy.
2007-10-10 11:04:58 -05:00
Jeremy Allison
38a70185b7 r10947: Fix bugs #3133 and #1828 - SPNEGO not working with PocketPC 2003.
Our sessionsetup code now handles raw NTLMSSP connects, so we can go
back to doing what W2K3 does here which is to send no OID's in
the negprot reply when not in a security=ads mode.
Jeremy.
2007-10-10 11:04:57 -05:00
Gerald Carter
3faaa5c3eb r7398: commiting abartlet's patch for kerberos authentication when using a keytab and security != ads 2007-10-10 10:57:08 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Jeremy Allison
d6ad1f8df0 r6069: Fix for bug #2541. Ensure we recognise LANMAN2.1 as OS/2 and select LANMAN2
protocol, ensure the EA size is always correctly set on a query for a file with no EA's.
Jeremy.
2007-10-10 10:56:20 -05:00
Gerald Carter
88747a7da3 r4018: * move claim_connection from the netbios session request
reply code to the negprot reply code to cope with
  client connections on port 445.  Fixes the spurious
  "register_message_flags: tdb fetch failed" errors.

* don't run the backgroup LPQ daemon when we are running
  in interactive mode.
2007-10-10 10:53:27 -05:00
Jeremy Allison
65dfae7ea4 r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use consistent
enum type for Protocol extern.
Jeremy.
2007-10-10 10:53:26 -05:00
Jeremy Allison
8b80b46b8b r1939: Ensure with my new change we set extended security in flags2 in
the negprot reply.
Jeremy.
2007-10-10 10:52:24 -05:00
Jeremy Allison
284689aa18 r1936: Fix bug noticed by Steve - ensure extended security bit is on only
if we negotiated extended security. Do not merge for 3.0.6. Works
with W2K but needs further testing.
Jeremy.
2007-10-10 10:52:24 -05:00
Jeremy Allison
cf84c0fe1a r1154: Change default setting for case sensitivity to "auto". If set to auto
then is the client supports it (current clients supported are Samba and
CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare
"NT LM 0.12" string) then the setting of the per packet flag smb_flag
FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows
the linux CIFS client to use Samba in a case sensitive manner.
Additional command in smbclient "case_sensitive", toggles the
flag in subsequent packets.
Docs to follow.
Jeremy.
2007-10-10 10:51:57 -05:00
Andrew Bartlett
3f9177bd5d As I raised (without objection) on the mailing list a while back, this
patch removes the 'unicode' smb.conf option.

Clients are as always free not to negotiate unicode, but Samba will always
accept unicode in smbd.

Setting 'unicode = no' caused me more client BSODs than any other option
I have seen, and I really want to protect some of our more silly users, who
will, no matter what, select and change every option...

Andrew Bartlett
-
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.
-
Jeremy Allison
e5714edc23 Signing so far... the client code fails on a SMBtrans2 secondary transaction
I think (my changes haven't affected this I believe). Initial support on the
server side for smbclient. Still doesn't work for w2k clients I think...
Work in progress..... (don't change).
Jeremy.
-
Jeremy Allison
f2e84f1ba6 Putting the framework for server signing in place. Ensure we don't use
sendfile when signing (I need to add this for readbraw/writebraw too...).
Jeremy.
-
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Jeremy Allison
b6ab9d7361 Got us happy running under valgrind again :-).
Jeremy.
-
Jeremy Allison
7dfcf714ae Fixes to stop valgrind complaining about uninitialised memory when it's
copying clobbered buffer areas and doing hashes on them and sending
them onto the wire.
Jeremy.
-
Andrew Tridgell
73c686ab77 merge LANMAN1/LANMAN2.1 fixes from head -
Andrew Bartlett
c5b604e2ee Jeremy merged across my string parinoia fixes, but forgot to enable them! :-)
This patch catches up on the rest of the work - as much string checking
as is possible is done at compile time, and the rest at runtime.

Lots of code converted to pstrcpy() etc, and other code reworked to correctly
call sizeof().

Andrew Bartlett
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
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.
-
Jeremy Allison
0bf7187e3b Change default of max_xmit to match W2K. Ensure NT negprot uses it.
Jeremy.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
42615b945e Sync 3.0 branch with head -