1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-11 17:58:16 +03:00

71 Commits

Author SHA1 Message Date
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Stefan Metzmacher
9ec706238c r14860: create libcli/security/security.h
metze
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
3c7a5ce291 r14720: Add torture_context argument to all torture tests 2007-10-10 13:59:13 -05:00
Jelmer Vernooij
f7312dab3b r14470: Remove some unnecessary headers. 2007-10-10 13:57:29 -05:00
Jelmer Vernooij
3dd477ca51 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
7054ebf024 r14402: Generate seperate headers for RPC client functions. 2007-10-10 13:57:19 -05:00
Jelmer Vernooij
1d2d970f3b r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Bartlett
54caf94942 r13908: Improve the RPC-SAMSYNC test to cross-check some attributes I wasn't
sure about.

This finds a new ACB_PW_EXPIRED attribute.

Andrew Bartlett
2007-10-10 13:52:22 -05:00
Jelmer Vernooij
c80a8f1102 r13903: Don't generate prototypes for modules and binaries in include/proto.h by
default.
2007-10-10 13:52:21 -05:00
Andrew Bartlett
341a0abeb4 r13583: Realise that the member server name appears in all calls that use the
credentials.

Consistantly rename these elements in the IDL to computer_name.

Fix the server-side code to always lookup by this name.

Add new, even nastier tests to RPC-SCHANNEL to prove this.

Andrew Bartlett
2007-10-10 13:51:58 -05:00
Stefan Metzmacher
67837dbd2b r13346: use private proto header files for the torture tests
metze
2007-10-10 13:51:47 -05:00
Jelmer Vernooij
73610639b2 r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
8aae0f168e r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
2007-10-10 13:47:48 -05:00
Tim Potter
d479f2d760 r11968: More warning fixes. We're on track to getting to double digits for
the number of warnings generated now.
2007-10-10 13:46:52 -05:00
Tim Potter
9c4436a124 r11967: Fix more 64-bit warnings. 2007-10-10 13:46:52 -05:00
Stefan Metzmacher
66a94de5dd r11676: as tridge uses 0x%llx in his latest commits...
try to use it every where and see how portable it is

metze
2007-10-10 13:46:12 -05:00
Tim Potter
03c7da27a0 r11626: Fix unhandled enum in case statement warnings by noting appropriately
that some values aren't handled.  The remaining warnings I think are
actual bugs or required functionality that is missing (mostly lack of
server side Unix extensions).
2007-10-10 13:46:01 -05:00
Jelmer Vernooij
540155fad3 r10528: Add credentials.h back into includes.h as some compilers don't
seem to be able to handle incomplete enum types.
2007-10-10 13:39:02 -05:00
Jelmer Vernooij
03647e1321 r10510: Decrease the amount of data included by includes.h a bit 2007-10-10 13:38:58 -05:00
Jelmer Vernooij
200a8f6652 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
2007-10-10 13:35:01 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00
Stefan Metzmacher
b3f01ef0df r8430: readd my hack to display the hashes with -d 100
metze
2007-10-10 13:23:02 -05:00
Stefan Metzmacher
e601042c07 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
2007-10-10 13:19:22 -05:00
Andrew Bartlett
e2015671c2 r7993: Further work on the Krb5 PAC.
We now generate the PAC, and can verifiy both our own PAC and the PAC
from Win2k3.

This commit adds the PAC generation code, spits out the code to get
the information we need from the NETLOGON server back into a auth/
helper function, and adds a number of glue functions.

In the process of building the PAC generation code, some hints in the
Microsoft PAC specification shed light on other parts of the code, and
the updates to samr.idl and netlogon.idl come from those hints.

Also in this commit:

The Heimdal build package has been split up, so as to only link the
KDC with smbd, not the client utils.

To enable the PAC to be veified with gensec_krb5 (which isn't quite
dead yet), the keyblock has been passed back to the calling layer.

Andrew Bartlett
2007-10-10 13:18:57 -05:00
Andrew Tridgell
3a3025485b r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
2007-10-10 13:18:15 -05:00
Andrew Bartlett
f0c67a4a24 r6603: More work on the samdump puzzle. This implements a function pointer
callback interface, so we can start dumping into more than just stdout
soon.

Also use the enums instead of uint32 where possible and valid.

Andrew Bartlett
2007-10-10 13:16:29 -05:00
Andrew Bartlett
adb5a3093e r6582: Remove the hack that metze needed because Samba4 didn't have a samdump
command.

Andrew Bartlett
2007-10-10 13:16:28 -05:00
Andrew Bartlett
8ee208a926 r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.

(Yes, jelmer objects to this inclusion of the kitchen sink ;-)

Andrew Bartlett
2007-10-10 13:16:26 -05:00
Andrew Bartlett
d9c31e60a7 r6544: Use common structures between SAMR, NETLGON and the Krb5 PAC.
Fill out the group list for the SamLogon reply, so clients get the
supplementary groups.

Andrew Bartlett
2007-10-10 13:16:24 -05:00
Andrew Bartlett
437aabf15e r6523: Another string that isn't filled in. I wonder why this is, but for
now don't fail the test.

Andrew Bartlett
2007-10-10 13:16:22 -05:00
Stefan Metzmacher
f4e12b3893 r6206: go baack 10 revisions to get DatabaseDeltas, this shows that the bdc only
need one call to get in sync again (except something like NT_STATUS_MORE_ENTRIES is returned)

also the pdc only need to know the current state values

metze
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
15b80a28db r5947: print out the password hashes when -d 100 is in use,
very usefull for creating a keytab file with

metze
2007-10-10 13:11:11 -05:00
Andrew Bartlett
0453f9d05d r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
ccefd78233 r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
2007-10-10 13:11:08 -05:00
Andrew Bartlett
824289dcc2 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
2007-10-10 13:11:07 -05:00
Andrew Bartlett
b7297c44fa r5878: Be clear which machine name (We have one worksation, and one BDC) we
are doing logins with.

Andrew Bartlett
2007-10-10 13:11:06 -05:00
Andrew Bartlett
08b47e2dc0 r5876: Add a test account for the duration of the samsync - to ensure we have
a good variety of things to test against.

Add code to testjoin to handle this just like test machine accounts

Soon I'll remove the 'must change password' flag, so we can do logins with it.

Andrew Bartlett
2007-10-10 13:11:06 -05:00
Andrew Tridgell
40a8340f1b r5390: use __location__ to make tracking down errors in RPC-SAMSYNC easier 2007-10-10 13:09:50 -05:00
Tim Potter
6749b9404d r5364: Rename string fields called 'domain' and 'name' to be 'domain_name'. 2007-10-10 13:09:46 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Bartlett
70860779ae r4776: Add more debugs to SamSync test.
Andrew Bartlett
2007-10-10 13:08:53 -05:00
Andrew Bartlett
cd9e795e40 r4708: Comparing with LDAP, it is clear that these 'flags' are in fact the
POSIX offset for the trusted domain.

Andrew Bartlett
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
b020dbec89 r4683: fix the build
metze
2007-10-10 13:08:42 -05:00
Andrew Bartlett
ded3303352 r4682: A LDB-based secrets implementation in Samba4.
This uses LDB (a local secrets.ldb and the global samdb) to fill out
the secrets from an LSA perspective.

Some small changes to come, but the bulk of the work is now done.

A re-provision is required after this change.

Andrew Bartlett
2007-10-10 13:08:42 -05:00
Andrew Bartlett
1fed79cb0f r4673: Fix the IDL for the QuerySecret LSA call.
This call uses a new IDL type, NTTIME_hyper.  This is 8-byte aligned,
as the name suggests.

Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to
validate the behaviour of times, and of the old secrets.

Thanks to tridge for spotting the use of HYPER!

Andrew Bartlett
2007-10-10 13:08:40 -05:00
Andrew Tridgell
4004c69937 r4616: the first phase in the addition of proper support for
dcerpc_alter_context and multiple context_ids in the dcerpc client
library.

This stage does the following:

 - split "struct dcerpc_pipe" into two parts, the main part being "struct dcerpc_connection", which
   contains all the parts not dependent on the context, and "struct dcerpc_pipe" which has
   the context dependent part. This is similar to the layering in libcli_*() for SMB

 - disable the current dcerpc_alter code. I've used a #warning until i
   get the 2nd phase finished. I don't know how portable #warning is, but
   it won't be long before I add full alter context support anyway, so it won't last long

 - cleanup the allocation of dcerpc_pipe structures. The previous code
   was quite awkward.
2007-10-10 13:08:34 -05:00