1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

164 Commits

Author SHA1 Message Date
Andrew Bartlett
102f5bc17d r1426: Fix some of my silly compile errors...
Andrew Bartlett
(This used to be commit c283837556)
2007-10-10 12:56:55 -05:00
Andrew Bartlett
82e59d11c3 r1423: Make sure to destory the mem_ctx.
Andrew Bartlett
(This used to be commit c5a1529d54)
2007-10-10 12:56:55 -05:00
Stefan Metzmacher
7caf17319a r1421: fix a uninitialized var (thanks valgrind:-)
add a view debug messages

metze
(This used to be commit 79953dccc1)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
7381ba30c4 r1420: be more strict reject if the context has the wrong type
metze
(This used to be commit db19d6047c)
2007-10-10 12:56:54 -05:00
Andrew Bartlett
bdb0b60861 r1418: Merge Samba 3.0's recent kerberos changes into Samba4. None of this
is used yet.

Andrew Bartlett
(This used to be commit 7596f311c9)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
2c87cb390d r1409: if we have no user name don't use extended security
the capabilities in the union smb_sesssetup should be used to decide
if we can use extented security

metze
(This used to be commit e3760fcc17)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
0fa2b94c56 r1406: I got spnego in the smb client working
so I set 'use spnego = True'

metze
(This used to be commit e06898f88c)
2007-10-10 12:56:54 -05:00
Andrew Bartlett
e59e82b902 r1372: Remove the 'default' case from the SPENGO state machine, and fix up
some compiler warnings that allowed us to see.

Andrew Bartlett
(This used to be commit 1a6c2018dd)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
7c139a6815 r1367: SPNEGO know uses gensec_subcontext_start() in all places
metze
(This used to be commit f737932402)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
4b7cd833a0 r1366: handle the case where the client need to send the negTokenInit before
getting something from the server.
(this is needed by SPNEGO in dcerpc)

metze
(This used to be commit ec978555f0)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
c688a1e18f r1365: in SPNEGO_SERVER_TARG we should not check the spnego_negResult
because the client don't send this

metze
(This used to be commit b1217a4ef6)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
6f0d8e67ff r1364: the SPNEGO_SERVER_TARG state is different from the SPNEGO_CLIENT_TARG
the client checks but not send spnego_negResult

metze
(This used to be commit 49e4d375e9)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
215c400aee r1363: add SPNEGO_NONE_RESULT as spnego_negResult value
this should indicate that we don't send a spnego_negResult t all over the wire

metze
(This used to be commit 69d685d817)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
1432bb01f3 r1360: - remove unused state SPNEGO_CLIENT_SEND_MECHS
- remove unsed gensec_user forward, it's done by the gensec layer know

metze
(This used to be commit e19e5a91f2)
2007-10-10 12:56:53 -05:00
Stefan Metzmacher
f9c7b6303c r1359: fix uninit var - found by valgrind
metze
(This used to be commit 264afea9ec)
2007-10-10 12:56:53 -05:00
Andrew Bartlett
14e8aab182 r1358: Re-indent the SPENGO implementation, and work on the basis of a
switch, rather than a series of if statements.

Also start to use the GENSEC subcontexts, and add some comments
explaining some of the 'odd' logic in parts.

I'll probably break these out into subfunctions soon.

Thanks to metze for getting me to do this :-)

Andrew Bartlett
(This used to be commit 73e03596d3)
2007-10-10 12:56:53 -05:00
Andrew Bartlett
93665a132d r1357: Work on GENSEC:
- Add the concept of a 'subcontext' into gensec, so that the spengo
   code doesn't have to figure out how to make one.
   (A subcontext inherits the username, domain, password (or callback)
   from the main context).

 - Add comments to some other routines, and explain a bit about what
   the various 'start' functions are for.

Andrew Bartlett
(This used to be commit 7aedbfbdd9)
2007-10-10 12:56:53 -05:00
Andrew Bartlett
674ad23789 r1353: Fix compile with new ASN1 peek code.
Andrew Bartlett
(This used to be commit 9039a2a112)
2007-10-10 12:56:52 -05:00
Andrew Bartlett
b359f5d893 r1352: Add a 'peek' function to our ASN1 code, so we can safely perform the
various switches without looking one byte past te end of the buffer.
(This used to be commit 5bce188d42)
2007-10-10 12:56:52 -05:00
Stefan Metzmacher
49d6c46fa3 r1350: - init nt_status- found by valgrind
- set auth_type = DCERPC_AUTH_TYPE_SPNEGO

metze
(This used to be commit 7354521f3c)
2007-10-10 12:56:52 -05:00
Stefan Metzmacher
3acfc94511 r1349: don't segfault with empty data_blob
metze
(This used to be commit a826accd55)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
1828f5d506 r1348: get gensec backend by OID instead of name
metze
(This used to be commit 38e00f8719)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
fff5d40ab5 r1347: - remove typedef
- pass down gensec_user to the sub context

- if segfault when mechType is NULL

metze
(This used to be commit 3f84263c27)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
50ce5fd990 r1346: revert my last spnego changes
metze
(This used to be commit 7b8237bfb3)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
4f0e5e0690 r1345: add extended security spnego support to the smb client
code

set lp_use_spnego = False, because I can't get it working yet
but I commit it so others can help me

metze
(This used to be commit 2445cceba9)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
8bebc53df8 r1344: add gensec_start_mech_by_name()
some gensec spnego fixes
(NULL pointer and length checks)

metze
(This used to be commit 41ff6d0cd4)
2007-10-10 12:56:51 -05:00
Volker Lendecke
0fa0eaa383 r1342: When fixing _lsa_lookupsids in samba3 I wanted to find out the number of SIDs
w2k3 can handle in a single request. With the samba3 client rpc libs I can do
about 21000 SIDs in a single request. test_many_LookupSIDs with 10000 SIDs
fails on the subsequent request with a NET_WRITE_FAULT. Maybe the Samba4 DCE
people want to take a look at this -- I don't see the problem.

Bug fix: SID components should be treated as unsigned when parsing

Volker
(This used to be commit 8c997a2ad2)
2007-10-10 12:56:51 -05:00
Andrew Bartlett
dc9f55dbec r1294: A nice, large, commit...
This implements gensec for Samba's server side, and brings gensec up
to the standards of a full subsystem.

This means that use of the subsystem is by gensec_* functions, not
function pointers in structures (this is internal).  This causes
changes in all the existing gensec users.

Our RPC server no longer contains it's own generalised security
scheme, and now calls gensec directly.

Gensec has also taken over the role of auth/auth_ntlmssp.c

An important part of gensec, is the output of the 'session_info'
struct.  This is now reference counted, so that we can correctly free
it when a pipe is closed, no matter if it was inherited, or created by
per-pipe authentication.

The schannel code is reworked, to be in the same file for client and
server.

ntlm_auth is reworked to use gensec.

The major problem with this code is the way it relies on subsystem
auto-initialisation.  The primary reason for this commit now.is to
allow these problems to be looked at, and fixed.

There are problems with the new code:
- I've tested it with smbtorture, but currently don't have VMware and
  valgrind working (this I'll fix soon).
- The SPNEGO code is client-only at this point.
- We still do not do kerberos.

Andrew Bartlett
(This used to be commit 07fd885fd4)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
25bf685da5 r1274: revert -r 1239 as discussed with abartlet
metze
(This used to be commit 52e2d03825)
2007-10-10 12:56:48 -05:00
Tim Potter
37fcf22364 r1268: varient -> variant
(This used to be commit de5984c956)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
81db9ef442 r1239: move the old msrpc_<gen|parse>() functions to ndr_<push|pull>_format_blob()
simular to ndr_<push|pull>_struct_blob()

metze
(This used to be commit b25dd341e0)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
68e8c18e33 r1229: the name of the protocol should be in first place of a function name
rename <read|write|free>_spnego_data() into
spnego_<read|write|free>_data

metze
(This used to be commit 3f57c8f596)
2007-10-10 12:56:46 -05:00
Andrew Bartlett
be081037e0 r1200: Add 'gensec', our generic security layer.
This layer is used for DCERPC security, as well as ntlm_auth at this
time.  It expect things like SASL and the CIFS layer to use it as
well.

The particular purpose of this layer is to introduce SPENGO, which
needs generic access to the actual implementation mechanisms.

Schannel, due to it's 'interesting' setup properties is in GENSEC, but
is only in the RPC code.

Andrew Bartlett
(This used to be commit 902af49006)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
bf598954f7 r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts.
I have moved the SPNEGO and Kerberos code into libcli/auth, and intend
to refactor them into the same format as NTLMSSP.

Andrew Bartlett
(This used to be commit 58da78a746)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
3e152fcd5b r1187: * Remove testing hack (actually check signatures on NTLM2).
* Remove unreached counter increment

* Print the correct NTLMSSP key.
(This used to be commit b967006954)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
dd711fee21 r1170: Remove bogus part of previous commit - session keys, even in NTLMSSP
are variable length.

Remove extra casts

Andrew Bartlett
(This used to be commit 84f86b83f8)
2007-10-10 12:56:43 -05:00
Andrew Bartlett
e6ac4b0552 r1169: Some more updates to the NTLMSSP NTLM2 code:
- implement key weakening
 - don't create large 'hashes' when we only want a key (signing subkeys)
 - make more useful debugs.

NTLM2 is still off by default, till I figure out how to do NTLM2 signing.

Andrew Bartlett
(This used to be commit 079c265485)
2007-10-10 12:56:43 -05:00
Andrew Tridgell
791ee4a581 r1134: added a TODO regarding schannel credentials
(This used to be commit 17dacf494a)
2007-10-10 12:56:39 -05:00
Andrew Tridgell
4d050d4920 r1131: remove an error msg for failing to open unexpected.tdb
(This used to be commit ae393c2ed6)
2007-10-10 12:56:39 -05:00
Andrew Bartlett
9f38798509 r1129: Remove unused function.
Andrew Bartlett
(This used to be commit 4d23b9e039)
2007-10-10 12:56:39 -05:00
Jeremy Allison
73c077d37b r1091: Added in timing tests for deferred opens. Added extra debug info to signing
mistakes.
Jeremy.
(This used to be commit 5c3a2417cf)
2007-10-10 12:56:37 -05:00
Andrew Bartlett
f3826432fb r1080: Make sure to initialise all the returned elements in the SamLogon
reply also initialise the LM session key, when we have it (was failing
because the auth code was setting it's length wrong).

Andrew Bartlett
(This used to be commit de97d9df22)
2007-10-10 12:56:37 -05:00
Andrew Bartlett
46c88d561f r1061: The start of the SamLogon call for the NETLOGON pipe.
Changes:

- Check for a valid 'pipe_state' in netr_ServerAuthenticate3 before
  we dereference it

- removes the expansionroom[7] in the netr_SamInfo* structs to 7
individual elements.
- renames netr_SamInfo -> netr_SamInfo2
          netr_SamInfo2 -> netr_SamInfo3
  - Having the thing we always called an 'info3' being 'netr_SamInfo2'
    was just too confusing.

- Expand and fill in extra details about users from the SAM, into
  the server_info, for processing into the SamLogon reply.

- Add a dum_sid_dup() function to duplicate a struct dom_sid

The SamLogon code currently does not return supplementary groups, and is
only tested with Samba4 smbtorture.

Andrew Bartlett
(This used to be commit 6c92563b79)
2007-10-10 12:56:35 -05:00
Andrew Tridgell
a38f529fd5 r1043: allocate signature from the right mem_ctx. Samba4 now passes the schannel torture test.
(This used to be commit 95599e3ef7)
2007-10-10 12:56:34 -05:00
Andrew Tridgell
a1318baa55 r1041: - pulled the domain join code out of the netlogon test and made it a separate utility function, to allow
multiple torture tests to temporarily join a domain

- fixed a session key size problem

- added a schannel test suite

- allow schannel to work with ncacn_ip_tcp
(This used to be commit 36f05e4d57)
2007-10-10 12:56:33 -05:00
Andrew Bartlett
c455b0a935 r1028: More consistancy fixes, which should also fix the build.
Andrew Bartlett
(This used to be commit 0d2ae66d3a)
2007-10-10 12:56:30 -05:00
Andrew Bartlett
ae067cdaf7 r1024: Use samr_Password for the machine password here - this ensures we can
never pass in something of the wrong length.

Andrew Bartlett
(This used to be commit d6999ea9c0)
2007-10-10 12:56:29 -05:00
Andrew Bartlett
9eb6afb00d r1009: Make all users of NT and LM passwords use the samr_Password structure.
This includes the netlogon pipe, for the machine account password
change system.

Andrew Bartlett
(This used to be commit 49d545a820)
2007-10-10 12:56:26 -05:00
Stefan Metzmacher
8f84a98e29 r1001: in samba4 we don't(shouldn't) use typedef's anymore...
metze
(This used to be commit ac5f6f7e51)
2007-10-10 12:56:25 -05:00
Andrew Tridgell
8087d844ef r995: - renamed many of our crypto routines to use the industry standard
names rather than our crazy naming scheme. So DES is now called
  des_crypt() rather than smbhash()

- added the code from the solution of the ADS crypto challenge that
  allows Samba to correctly handle a 128 bit session key in all of the
  netr_ServerAuthenticateX() varients. A huge thanks to Luke Howard
  from PADL for solving this one!

- restructured the server side rpc authentication to allow for other
  than NTLMSSP sign and seal. This commit just adds the structure, the
  next commit will add schannel server side support.

- added 128 bit session key support to our client side code, and
  testing against w2k3 with smbtorture. Works well.
(This used to be commit 729b2f41c9)
2007-10-10 12:56:25 -05:00