1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

142 Commits

Author SHA1 Message Date
Jeremy Allison
23f16cbc2e r13293: Rather a big patch I'm afraid, but this should fix bug #3347
by saving the UNIX token used to set a delete on close flag,
and using it when doing the delete. libsmbsharemodes.so still
needs updating to cope with this change.
Samba4 torture tests to follow.
Jeremy.
2007-10-10 11:06:21 -05:00
Jeremy Allison
48dd8c732b r13176: Fix show-stopper bug for 3.0.21b where 4 leg NTLMSSP SPNEGO
auth was not generating the correct auth header on the 4th
packet. This may fix a lot of Windows client complaints and
is essential for release.
Jeremy.
2007-10-10 11:06:16 -05:00
Jeremy Allison
672113a627 r11950: If we got a connection oriented cancel pdu we would spin processing it.
Fix that, and also add in comments for all possible CL and CO PDU
types. Make sure we process them correctly.
Jeremy.
2007-10-10 11:05:39 -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
a6d8a4b1ff r10792: Fix the "schannel not stored across client disconnects" problem.
Based on the Samba4 solution - stores data in
$samba/private/schannel_store.tdb.
This tdb is not left open but open and closed on demand.
Jeremy.
2007-10-10 11:04:54 -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
592ec9fbff r9080: If we don't understand the auth, bind nak not pdu fault.
Should fix usermgr on W2K3 SP1.
Jeremy.
2007-10-10 11:00:25 -05:00
Jeremy Allison
fd6e342746 r8805: Merge a duplicate struct. Get ready to support SPNEGO rpc binds.
Jeremy.
2007-10-10 11:00:18 -05:00
Jeremy Allison
475d5a277d r7708: Hint from Luke Howard (thanks Luke). Ensure the schannel authenticator is 8
byte aligned, just like the NTLMSSP ones. Trying to fix 64-bit Windows domain
logon.
Jeremy.
2007-10-10 10:57:20 -05:00
Jeremy Allison
877e0a61f5 r7385: Rewrite the RPC bind parsing functions to follow the spec. I haven't yet
tested this so I may have screwed this up - however it now follows the
DCE spec. valgrinded tests to follow....
Jeremy.
2007-10-10 10:57:07 -05:00
Volker Lendecke
c25b4afda2 r7217: Only allow schannel connections if a successful Auth2 has been done
before. Things tested: Domain join and subsequent interactive and network
logon to NT4, W2kSP and XPSP2 workstations and a NT4 domain trusting us. Right
now I've got problems with my W2k3 domain trusts. So this needs testing,
although I'm really confident that this does not break.

Volker
2007-10-10 10:57:05 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Gerald Carter
4e0ac63c36 r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
2007-10-10 10:56:15 -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
Andrew Bartlett
36741d3cf5 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
2007-10-10 10:52:13 -05:00
Jeremy Allison
8cfaf575e5 r1415: One more memory leak, found by valgrind..
Jeremy.
2007-10-10 10:52:11 -05:00
Jeremy Allison
7c4666e56c r1414: Memory leak fixes found by valgrind whilst checking the password history code.
Error code paths were not freeing up some memory.
Jeremy.
2007-10-10 10:52:11 -05:00
Volker Lendecke
4fda68a62f r1338: A netlogon schannel failure is a normal event with XP clients. They cache the
netlogon session key and try to reconnect using that key. This fails with a
restarted smbd, we expect another serverauth2. XP falls back immediately.

Make the corresponding messages a debug level 3, not 0 to not flood log.smbd.

Volker
2007-10-10 10:52:07 -05:00
Gerald Carter
316ba5ad89 r704: BUG 1315: fix for schannel client connections to server's that don't support 128 bit encryption 2007-10-10 10:51:34 -05:00
Jeremy Allison
7f837db6e4 r475: Don't add ss padding length to the sent length as this is compared
with the actual data to return.
Jeremy.
2007-10-10 10:51:24 -05:00
Jeremy Allison
038cae8a37 r473: Fix for Microsoft hotfix MS04-011 password change breakage.
Jeremy.
2007-10-10 10:51:24 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Gerald Carter
1fae60ab20 r115: finally checking in tridge's winbindd_schannel patch for connections 2007-10-10 10:51:09 -05:00
Andrew Bartlett
f3bbc87b0d Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
0001-01-01 00:00:00 +00:00
Gerald Carter
3802f5895e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain 0001-01-01 00:00:00 +00:00
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX 0001-01-01 00:00:00 +00:00
Gerald Carter
dd9cb6f820 fix build 0001-01-01 00:00:00 +00:00
Gerald Carter
96bc2abfcb Attempt at fixing bug #283. There however is no solution.
There is a workaround documented in the bug report.

This patch does:

  * add server support for the LSA_DS UUID on the lsarpc pipe
  * store a list of context_ids/api_structs in the pipe_struct
    so that we don't have to lookup the function table for a pipe.
    We just match the context_id.  Note that a dce/rpc alter_context
    does not destroy the previous context so it is possible to
    have multiple bindings active on the same pipe. Observed from
    standalone win2k sp4 client.
  * added server code for DsROleGetPrimaryDOmainInfo() but disabled it
    since it causes problems enumerating users and groups from a 2ksp4
    domain member in a Samba domain.
0001-01-01 00:00:00 +00:00
Jeremy Allison
049e77d636 Format tidyup.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
a2bd8f0bfa Update my copyrights according to my agreement with IBM 0001-01-01 00:00:00 +00:00
Jim McDonough
15d2bc4785 Fix copyright statements for various pieces of Anthony Liguori's work. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
77c3e69aef In the presense of RPC fragments, schannel is not strictly request/reply,
so the shared sequence number will not be strictly odd/even.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5472ddc9ea Jeremy requested that I get my NTLMSSP patch into CVS. He didn't request
the schannel code, but I've included that anyway. :-)

This patch revives the client-side NTLMSSP support for RPC named pipes
in Samba, and cleans up the client and server schannel code.  The use of the
new code is enabled by the 'sign', 'seal' and 'schannel' commands in
rpcclient.

The aim was to prove that our separate NTLMSSP client library actually
implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation,
in the hope that knowing this will assist us in correctly implementing
NTLMSSP signing for SMB packets.  (Still not yet functional)

This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with
calls to libsmb/ntlmssp.c.  In the process, we have gained the ability to
use the more secure NT password, and the ability to sign-only, instead of
having to seal the pipe connection.  (Previously we were limited to sealing,
and could only use the LM-password derived key).

Our new client-side NTLMSSP code also needed alteration to cope with our
comparatively simple server-side implementation.  A future step is to replace
it with calls to the same NTLMSSP library.

Also included in this patch is the schannel 'sign only' patch I submitted to
the team earlier.  While not enabled (and not functional, at this stage) the
work in this patch makes the code paths *much* easier to follow.  I have also
included similar hooks in rpccleint to allow the use of schannel on *any* pipe.

rpcclient now defaults to not using schannel (or any other extra per-pipe
authenticiation) for any connection.  The 'schannel' command enables schannel
for all pipes until disabled.

This code is also much more secure than the previous code, as changes to our
cli_pipe routines ensure that the authentication footer cannot be removed
by an attacker, and more error states are correctly handled.

(The same needs to be done to our server)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
85f88191b9 This patch takes the work the jerry did for beta2, and generalises it:
- The 'not implmented' checks are now done by all auth modules
 - the ntdomain/trustdomain/winbind modules are more presise as to
   what domain names they can and cannot handle
 - The become_root() calls are now around the winbind pipe opening only,
   not the entire auth call
 - The unix username is kept seperate from the NT username, removing the
   need for 'clean off the domain\' in parse_net.c
 - All sid->uid translations are now validated with getpwuid() to put a very
   basic stop to logins with 'half deleted' accounts.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Simo Sorce
0e58085978 And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
bc4b51bcb2 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
0001-01-01 00:00:00 +00:00
Volker Lendecke
d4262c37f1 Setting the credentials for the netsec netlogon pipe connect upon each
samlogon call certainly breaks the credential chain. Do it once during
the bind response.

Volker
0001-01-01 00:00:00 +00:00
Jeremy Allison
ff66d40970 Fixes to make SCHANNEL work in 3.0 against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
aca7319e8d use the new modules system for the rpc modules (backport from HEAD) 0001-01-01 00:00:00 +00:00
Tim Potter
017da9393b Merge of rpcecho pipe for testing large dcerpc requests and responses.
Only compiled in when --enable-developer argument passed to configure.
0001-01-01 00:00:00 +00:00
Volker Lendecke
0f348a35d0 Put the core schannel functions to parse_prs.c. They are also used by
schannel clients.

Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
6b2b55901d Merge the TNG netlogon schannel from HEAD.
No more XP requiresignorseal anymore!

Thanks again to Luke :-)

Volker
0001-01-01 00:00:00 +00:00
Jeremy Allison
dedc18212a Fix const warning.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a823fee5b4 Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
d9c485b010 merge from HEAD - enable dynamic RPC modules 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
Gerald Carter
1cfd2ee433 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
0001-01-01 00:00:00 +00:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release 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
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