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

75 Commits

Author SHA1 Message Date
Andrew Bartlett
a19d002cee r6032: Fix up SetServerPassword2 on NETLOGON for [bigendian]. Clearly nobody
has the patience to run test_w2k3.sh to completion :-)

It looks to me that the Windows server runs the RC4 over the C struct,
not the NDR data.

Andrew Bartlett
(This used to be commit c324d97413)
2007-10-10 13:11:16 -05:00
Jelmer Vernooij
ffae01d432 r5672: Use switch_type() and the token storage mechanism for unions:
- Makes union handling less special
 - Allows unions in arrays, etc
 - Compatible with midl
 - Pidl will warn about switch_type() and the type of the switch_is() variable being different
(This used to be commit dc6b4ffc82)
2007-10-10 13:10:58 -05:00
Jelmer Vernooij
631aa1f0ef r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
(This used to be commit a416de5825)
2007-10-10 13:10:57 -05:00
Andrew Bartlett
5045bdc2a4 r5090: Fix up the IDL for LogonGetDomainInfo in NETLOGON.
Andrew Bartlett
(This used to be commit e5afc36093)
2007-10-10 13:09:21 -05:00
Andrew Tridgell
3dd17f1288 r5034: - added a type mapping function in pidl, so the type names in our IDL
files don't need to match the type names in the generated headers

- with this type mapping we no longer need definitions for the
  deprecated "int32", "uint8" etc form of types. We can now force
  everyone to use the standard types int32_t, uint8_t etc.

- fixed all the code that used the deprecated types

- converted the IDL types "int64" and "uint64" to "dlong" and
  "udlong". These are the 4 byte aligned 64 bit integers that
  Microsoft internally define as two 32 bit integers in a
  structure. After discussions with Ronnie Sahlberg we decided that
  calling these "int64" was confusing, as it implied a true 8 byte
  aligned type

- fixed all the cases where we incorrectly used things like
  "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for
  those. The fact that it is hyper-aligned on the wire is not relevant
  to the API, and should remain just a IDL property
(This used to be commit f86521677d)
2007-10-10 13:09:15 -05:00
Tim Potter
9eea1eb94f r5005: Add missing size specifiers to various bitmaps.
(This used to be commit 19a907cb58)
2007-10-10 13:09:12 -05:00
Stefan Metzmacher
3c9a2e225a r4804: add more emuns and bitmaps
metze
(This used to be commit 3381617a03)
2007-10-10 13:08:57 -05:00
Andrew Bartlett
2e33042aa7 r4774: It appears the SensitiveData contains the password history, as the
remaining data.  Pity - I was looking for kerberos keys :-)

Andrew Bartlett
(This used to be commit 37a81aad74)
2007-10-10 13:08:53 -05:00
Andrew Bartlett
7ea2317e97 r4708: Comparing with LDAP, it is clear that these 'flags' are in fact the
POSIX offset for the trusted domain.

Andrew Bartlett
(This used to be commit cd9e795e40)
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
516dbfd5ed r4702: implment idl, torture test and server code for netr_ServerPasswordSet2()
metze
(This used to be commit 7d8ba92da2)
2007-10-10 13:08:45 -05:00
Stefan Metzmacher
fd4831f1f0 r4650: - make more use of bitmap and enum's
- move some structs out of misc.idl

metze
(This used to be commit b6543a6e30)
2007-10-10 13:08:39 -05:00
Stefan Metzmacher
678038a0f2 r4552: use samr_AcctFlags in netlogon.idl
metze
(This used to be commit 3e224575e5)
2007-10-10 13:08:26 -05:00
Andrew Tridgell
58d9adf409 r4526: - much simpler (and more accurate!) ndr_size_*() code generation. It
is less efficient, but I really doubt that matters.

- use enum in epmapper.idl for protocol type

- added support for "enum8bit" flag, used in epmapper.idl
(This used to be commit 1a24a50384)
2007-10-10 13:08:18 -05:00
Günther Deschner
fbb5a6a0fa r4057: unknown5 represents the account policy "Users must logon to change
password".

Guenther
(This used to be commit 18e01ae254)
2007-10-10 13:06:20 -05:00
Andrew Bartlett
21ebf8b942 r3922: Add yet another NETLOGON RPC. This is another varient of SamLogon,
that works only on SCHANNEL secured connections (as it needs the
implicit credentials).

Fix some of the IDL.

Andrew Bartlett
(This used to be commit 90cd7b34cc)
2007-10-10 13:06:06 -05:00
Stefan Metzmacher
e94c88cedc r3914: add idl, torture test and simple server for netr_DrsGetDCNameEx2()
metze
(This used to be commit 1ffabbaa66)
2007-10-10 13:06:05 -05:00
Andrew Bartlett
201393fd8b r3908: We know that this field is a flag of some kind, and matches the output on LSA.
Andrew Bartlett
(This used to be commit e3dce0f5be)
2007-10-10 13:06:04 -05:00
Andrew Bartlett
be7a3e3ce0 r3904: * Add new LSA calls to open trusted domains
* Add new tests for ACCOUNTs in SamSync

* Clean up names in NETLOGON and LSA

* Verify Security Descriptors against LSA, as well as SamR

Andrew Bartlett
(This used to be commit 7094502fe0)
2007-10-10 13:06:03 -05:00
Andrew Bartlett
5ad5c6cc70 r3807: Cross-check the basic attributes for groups and aliases in RPC-SAMSYNC.
Andrew Bartlett
(This used to be commit 90398fda41)
2007-10-10 13:05:56 -05:00
Andrew Bartlett
9aec081fd9 r3804: Add more comparison tests in RPC-SAMSYNC.
This compares values for the domain and for secrets.  We still have
some problems we need to sort out for secrets.

Also rename a number of structures in samr.idl and netlogon.idl, to
better express their consistancy.

Andrew Bartlett
(This used to be commit 3f52fa3a42)
2007-10-10 13:05:55 -05:00
Andrew Bartlett
50916c8f2f r3724: Rename a number of structures, for better consistance between SAMR and
NETLOGON.

In particular, rename samr_Name to samr_String - given that many
strings in this pipe are not 'names', the previous was just confusing.
(I look forward to PIDL turning these into simple char * some day...).

Also export out a few changes from testjoin.c to allow for how I have
written the new RPC-SAMSYNC test.

Andrew Bartlett
(This used to be commit 9cd666bcfb)
2007-10-10 13:05:47 -05:00
Andrew Bartlett
1158268287 r3716: Improvements in the RPC-SAMSYNC tests:
We now (for the first time) start to parse the 'user sensitive info'
 field, which reveals the user's NT and LM passwords from Win2k3.

 Using this, the 'validate samsync against netlogon' portion of the
 tests works for accounts.

 Trusted domains and secrets are now retreived, but like users,
 require further cross-validation work.

Andrew Bartlett
(This used to be commit c1d3794cad)
2007-10-10 13:05:46 -05:00
Andrew Bartlett
fd5135a63b r3686: The results of some work on the NETLOGON pipe:
Break out the samsync tests from RPC-NETLOGON into a new RPC-SAMSYNC,
that will cross-verify all the values.

Add support for the way netlogon credentials are shared between the
pipe that sets up schannel and the pipe that is encrypted with it.

Test this support, by calling both NETLOGON and SAMR operations in the
RPC-SCHANNEL test.

Move some of the Netlogon NEG flags into the .idl, now we have an idea
what a few of them really are.

Rename the sam_pwd_hash into a name that has meaning (all other crypto
functions were renamed in Samba4 ages ago).

Break out NTLMv2 functionality for operation on the NT hash - I intend
to do NTLMv2 logins in the samsync test in future, and naturally I
only have the hash.

Andrew Bartlett
(This used to be commit 6e6cc6fb98)
2007-10-10 13:05:43 -05:00
Andrew Bartlett
0af3429b85 r3558: We don't seem to need these as [public] any more.
Andrew Bartlett
(This used to be commit f1d0bb409a)
2007-10-10 13:05:32 -05:00
Andrew Tridgell
edbfc0f6e7 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
(This used to be commit 7b7477ac42)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8)
2007-10-10 13:05:09 -05:00
Andrew Tridgell
eb3b256864 r3392: fixed schannel over ncalrpc
(This used to be commit 0b93be9f5f)
2007-10-10 13:05:05 -05:00
Andrew Bartlett
b448bd5b5e r3362: Change netlogon.idl so we can parse the 'info3' seperate from it's surroundings, and rename user_id -> rid, as it could be a user or group id.
Andrew Bartlett

Andrew Bartlett
(This used to be commit 18d0d70994)
2007-10-10 13:05:01 -05:00
Andrew Tridgell
2bf6dff983 r3283: converted to quoted uuid() defines in all our IDL. This should help
the build on systems like solaris with the SunPRO compiler
(This used to be commit fe913ad11b)
2007-10-10 13:04:50 -05:00
Jelmer Vernooij
31403d548e r3043: Use binding strings for specifying endpoints. The property for
specifying a endpoint is now also 'endpoint' instead of 'endpoints'. The
default endpoint (if none is specified) is still "ncacn_np:[\\pipe\\ifacename]",
where ifacename is the name of the interface.

Examples:

[
  uuid(60a15ec5-4de8-11d7-a637-005056a20182),
  endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:")
]
interface rpcecho
{
	void dummy();
}

dcerpc_binding is now converted to ep_description in the server, but I hope to
completely eliminate ep_description later on.

The eventual goal of all these changes is to make it easier to add
 transports as I'm going to add support for
 ncalrpc (local RPC over named pipes) and ncacn_unix_stream (Unix sockets).
(This used to be commit f3da7c8b44)
2007-10-10 13:01:53 -05:00
Andrew Tridgell
468fe3e5db r2128: netlogon DELTA_POLICY fix from rrenard
(This used to be commit 5ab362cede)
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
8460fc7df9 r1995: a ndrdump file from abartlet make it clear that this isn't a pointer
to a uint32, there're two uint32 with 0x00000000

metze
(This used to be commit 80f27766cb)
2007-10-10 12:58:16 -05:00
Andrew Tridgell
0f32036afe r1675: netlogon deltas IDL update from Richard Renard
(This used to be commit ae49221301)
2007-10-10 12:57:48 -05:00
Andrew Tridgell
5b044b30ca r1150: - fixed interactive sam logon in the rpc server
- added a torture test for interactive login in smbtorture

These changes allow winxp to perform an interactive login (a login on
the winxp console) against a Samba4 DC. Our netlogon server code is
still filling in many of the fields incorrectly, but it fills in
enough that winxp can login.
(This used to be commit db9ea488b0)
2007-10-10 12:56:41 -05:00
Andrew Tridgell
8cd82a6c85 r1144: added logon level 5 for sam logon
(This used to be commit eb13fc6c3b)
2007-10-10 12:56:40 -05:00
Andrew Tridgell
7ae1735798 r1141: - consolidated the netr_SamInfo structures using a netr_SamBaseInfo
structure (andrew, this is the type of structure consolidation I think
  you were asking about. It's possible here in NDR as it isn't in the
  top level fn code)

- added validation level 6 in sam logon

With these changes I can successfully authentication smbclient to a
winxp server, with the winxp server using a Samba4 ADS DC for account
auth
(This used to be commit 705205083a)
2007-10-10 12:56:40 -05:00
Andrew Tridgell
19f3bfc0ac r1140: added IDL and test code for validation level 6 in sam logon
(This used to be commit c854109843)
2007-10-10 12:56:40 -05:00
Andrew Tridgell
a384d2f1a1 r1139: added IDL and server code for netr_LogonSamLogonWithFlags()
(This used to be commit 4eac7340d8)
2007-10-10 12:56:40 -05:00
Andrew Tridgell
bccac81d87 r1136: - added IDL for netr_LogonGetDomainInfo()
- added workstation to auth_session_info in rpc servers

- added session key fetch hook in crypto backends in dcesrv

- store and fetch seed as well as a session key in schannel ldb

- when a client uses schannel to setup a netlogon pipe connection we
  also need to setup the credentials from the schannel negotiation so
  credentials chaining works

- added server side netr_LogonGetDomainInfo() call
(This used to be commit a35459387d)
2007-10-10 12:56:39 -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 Bartlett
bcac502d44 r1058: The start of work on the SamLogon call for NETLOGON.
This starts to store information about the user in the server_info
struct - like the account name, the full name etc.

Also, continue to make the names of the structure elements in the
logon reply more consistant with those in the SAMR pipe.

Andrew Bartlett
(This used to be commit 3ccd96bd94)
2007-10-10 12:56:35 -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
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
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
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 Tridgell
6d2559f354 r781: added level6 for logon level in SamLogon netlogon.idl
(This used to be commit 446808ae4d)
2007-10-10 12:53:50 -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
473d669835 r392: added IDL for 3 more netlogon Delta levels, thanks to a dump from Richard Renard
(This used to be commit 2d8772ec96)
2007-10-10 12:51:37 -05:00