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

194 Commits

Author SHA1 Message Date
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
Tim Potter
21aaa719b5 r1026: Spelling.
(This used to be commit b7fe73613a)
2007-10-10 12:56:30 -05:00
Andrew Bartlett
5b04ca8080 r1025: Rename (across the samr and netlogon pipes, so far)
pwd -> password
passwd -> password

username -> account_name

Also work on consistant structure feild names between these two pipes,
and fix up some callers to use samr_Password for the netlogon
credential code.

Andrew Bartlett
(This used to be commit 4e35418c27)
2007-10-10 12:56:30 -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
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
Stefan Metzmacher
98d291423f r961: convert 'uchar' to 'uint8_t'
metze
(This used to be commit 9f914e4af9)
2007-10-10 12:56:23 -05:00
Andrew Tridgell
6a0ce94d02 r950: - added netr_ServerAuthenticate3(). This is used by WinXP clients who try to login to Samba4, as
WinXP sees us as an ADS server.

Unfortunately WinXP also uses a set of negotiate_flags that we don't
support yet. Some crypto work needed.
(This used to be commit 2d740b6570)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -05:00
Andrew Tridgell
d9538e7412 r937: - added a simple QuerySecurity implementation in samr server
- moved some sec desc defines into misc.idl

 - fixed pw_len field in UserInfo26

 - made some pipes available on TCP

 - added netr_DsrEnumerateDomainTrusts() to netlogon

 - added templates for remaining netlogon IDL calls (from ethereal)

 - added a unistr_noterm vs unistr error detector in ndr basic decoder

 - added torture test for netr_DsrEnumerateDomainTrusts()
(This used to be commit ae5a5113fb)
2007-10-10 12:56:20 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Andrew Bartlett
5b0ab386cb r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long
way to cleaning up the memory leaks in this code.  This also avoids a
lot of extra copies of data, as we now allocate the 'return' blobs on
a caller-supplied context.

I have also been doing a lot of work towards NTLM2 signing and
sealing.  I have this working for sealing, but not for the verifier
(MD5 integrity check on the stream) which is still incorrect.

(I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the
data arrives intact, but the signature check fails.  It does however
match the test values I have...).

The new torture test is cludged in - when we get a unit test suite
back, I'll happliy put it in the 'right' place....

Andrew Bartlett
(This used to be commit 399e2e2b11)
2007-10-10 12:56:14 -05:00
Andrew Tridgell
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c6)
2007-10-10 12:56:14 -05:00
Andrew Bartlett
93076cb9bc r816: - Make use of tridge's new samdb_result_sid_prefix() helper function.
- Remove legacy sid_to_string (which contained a memleak)

 - Remove some unused parts of lib/util_sid.c

Andrew Bartlett
(This used to be commit 7c69a85984)
2007-10-10 12:53:52 -05:00
Andrew Tridgell
47a3f0cc38 r782: added torture test for level 6 logon level in netr_LogonSamLogon
(This used to be commit 770322bfdf)
2007-10-10 12:53:50 -05:00
Andrew Bartlett
92dd542aa0 r754: Implement the SetPassword operation on the netlogon pipe.
This involves allowing the password set code in samdb to take an
already hashed password, and some fixes to our torture code.

Andrew Bartlett
(This used to be commit f9f581b580)
2007-10-10 12:53:48 -05:00
Andrew Bartlett
6703be3ef0 r752: Remove debugging hack (make sure the cleanup test account after we
leave) and test that the password change actually worked.

Andrew Bartlett
(This used to be commit a93c70154a)
2007-10-10 12:53:48 -05:00
Andrew Bartlett
064e7447be r743: Start on a NETLOGON server in Samba4.
Currently this only authentiates the machine, not real users.

As a consequence of running the Samba4 NETLOGON test against Samba4, I
found a number of issues in the SAMR server, which I have addressed.
There are more templates in the provison.ldif for this reason.

I also added some debug to our credentials code, and fixed some bugs
in the auth_sam module.

The static buffer in generate_random_string() bit me badly, so I
removed it in favor of a talloc based system.

Andrew Bartlett
(This used to be commit 94624e519b)
2007-10-10 12:53:46 -05:00
Andrew Bartlett
060f94b9fc r684: Note the fact that NTLMv2 provides a weath of futher testcases...
Andrew Bartlett
(This used to be commit d75558cdcb)
2007-10-10 12:53:42 -05:00
Andrew Bartlett
dce84ffd37 r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.
- This required using NETLOGON_NEG_AUTH2_FLAGS for the
    SetupCredentials2 negotiation flags, which is what Samba3 does,
    because otherwise the server uses different crypto.
  - This tests the returned session keys, which we decrypt.

 - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in
   most places.

 - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is
   available.

 - Remove a useless argument to SMBsesskeygen_ntv1

 - move netr_CredentialState from the .idl to the new credentials.h

Andrew Bartlett
(This used to be commit 44f8b5b53e)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
810831434a r582: added the LMSessKey in SamInfo and SamInfo2, thanks to work by abartlet
added test code for SamLogon validation level 2 and 3, so we test both
SamInfo and SamInfo2
(This used to be commit 321dbb61cc)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
16d3528ebc r372: automatically create a fake BDC machine account and delete it
afterwards for the RPC-NETLOGON test. This makes it much simpler to
run the test and also means that it doesn't distrurb any existing
domain join you might have.
(This used to be commit feac996794)
2007-10-10 12:51:35 -05:00
Andrew Tridgell
72daedbeb7 r133: don't try to do a database deltas with a -1 seq num
(This used to be commit dcb172d207)
2007-10-10 12:51:10 -05:00
Stefan Metzmacher
0b4da9d7e0 - add 'print' to the DCERPC binding strings
e.g.
  ncacn_np:myserver:[samr,sign,print]

  will now enable the packet debugging

  and the debugging is not bound anymore to the debuglevel >= 2
  in the torture tests

- also the dcesrv_remote module now supports debugging of the packets
  use the 'dcerpc_remote:binding' smb.conf parameter.

metze
(This used to be commit 40abf3c584)
2004-02-03 14:56:07 +00:00
Andrew Tridgell
ea507ee605 added netr_LogonControl2Ex()
I also added IDL for netr_DatabaseRedo() but I don't yet know how it
works

thats the last of the netlogon IDL !
(This used to be commit 387d8f25ff)
2003-12-02 12:16:08 +00:00
Andrew Tridgell
de32d669c6 added netr_DatabaseSync2()
(This used to be commit 0f6af0c4bd)
2003-12-02 12:01:10 +00:00
Andrew Tridgell
9ebe4489e7 added netr_LogonControl2() and netr_ServerAuthenticate2()
(This used to be commit cc4123db4b)
2003-12-02 11:43:09 +00:00
Andrew Tridgell
10ad200350 added netr_LogonControl() and netr_GetAnyDCName()
(This used to be commit 17b2be4e85)
2003-12-02 10:34:06 +00:00
Andrew Tridgell
02df116352 added netr_GetDcName() - quite a useful call
(This used to be commit 63f46b223e)
2003-12-02 10:08:26 +00:00
Andrew Tridgell
16c688c9ea added netr_AccountSync(), another NT_STATUS_NOT_IMPLEMENTED call
according to w2k3
(This used to be commit b2ca00ebc5)
2003-12-02 10:04:10 +00:00
Andrew Tridgell
9ec4269760 added netr_AccountDeltas(), which w2k3 gives
"NT_STATUS_NOT_IMPLEMENTED" for
(This used to be commit aaf776a1c1)
2003-12-02 09:52:15 +00:00
Andrew Tridgell
cea22e94fc netr_DatabaseDeltas() now works. We ask for the deltas associated with
the last two sequence numbers on each database.
(This used to be commit f9377c8603)
2003-12-02 08:04:37 +00:00
Andrew Tridgell
399496d9d9 netr_DatabaseSync() now works fully for databases 0, 1 and 2
(This used to be commit c4c09e9413)
2003-12-02 04:59:18 +00:00
Andrew Tridgell
9632db5a19 netr_DatabaseSync() now works fully for database 0
(This used to be commit 360d03bb56)
2003-12-02 04:33:57 +00:00
Andrew Tridgell
f9419900d3 initial netlogon database sync partly works - needs some IDL tweaks
(This used to be commit 75ea276c14)
2003-12-02 04:05:05 +00:00
Andrew Tridgell
d65f0095c9 added netr_DatabaseSync(). It doesn't work as I haven't done schannel
yet, but at least the request is understood by w2k3

Also modified pidl to allow multiple branches in a union to have the
same element. This is used in netlogon.
(This used to be commit 983c0e9683)
2003-12-02 03:06:21 +00:00
Andrew Tridgell
2e70035f87 another big improvement in the credentials API. I think it now
actually makes sense, and as a nice side effect it matches the debug
output of the w2k3 netlogon.log
(This used to be commit 3c7287c24e)
2003-12-02 02:15:33 +00:00
Andrew Tridgell
06ae424835 * netr_ServerPasswordSet() now works - the test suite changes the
machine account password.

  * neater handling on value() options in IDL. The auto-print code
    will now display the right value so you don't need to initialise
    it in your C code
(This used to be commit 3dd978b12b)
2003-12-02 00:31:54 +00:00
Andrew Tridgell
8b30b0071c * another small API change in the credentials code
* don't use static variables in the smbdes code
(This used to be commit e6e0906464)
2003-12-01 22:13:11 +00:00
Andrew Tridgell
f9e2a8af39 neater credentials handling in netlogon client code
(This used to be commit b7d748f499)
2003-12-01 12:41:54 +00:00
Andrew Tridgell
a6cf6cada9 added netr_LogonSamLogon() and test code
(This used to be commit 4fa3ad3ecb)
2003-12-01 09:28:10 +00:00
Andrew Tridgell
b4b0177fdb added netr_ServerAuthenticate() and test code
I would like the netlogon test suite to eventually do a new domain
join using a fake workstation name, then remove itself afterwards, but
for now I'm assuming we are already joined to the domain when the
testsuite runs. This means you need to use the Samba3 net command to
do a join before running RPC-NETLOGON
(This used to be commit 8c7a9446a0)
2003-12-01 04:13:43 +00:00
Andrew Tridgell
5b46116923 added netr_ServerReqChallenge and cleaned up byte array printing
(This used to be commit bb42107dcc)
2003-12-01 03:19:43 +00:00
Andrew Tridgell
b0531a38cc started adding netlogon IDL and test suite
(This used to be commit 3d64eefb46)
2003-12-01 01:41:38 +00:00