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

4185 Commits

Author SHA1 Message Date
Andrew Bartlett
48c5187967 r6033: Patch from 'lifeless' to clarify behaviour with NULL pointers.
Andrew Bartlett
2007-10-10 13:11:16 -05:00
Andrew Bartlett
c324d97413 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
2007-10-10 13:11:16 -05:00
Andrew Tridgell
54c0284679 r6031: don't try to send errors when the socket has been destroyed 2007-10-10 13:11:16 -05:00
Andrew Bartlett
1e0e66d720 r6030: Missing from previous commit, a small header file to link
libcli/auth/schannel.c and libcli/auth/schannel_sign.c

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
2301a4b38a r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
b5260cf0d4 r6027: Add copyright, and add a useful debug message.
Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
ef7f9a01b4 r6026: Update the kerberos keytab code to match Samba3 again.
(untested at this point).

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
13d09c8e9a r6025: Remove unused variables. This code will be modified again for the new
cli_credentials code shortly.

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Andrew Bartlett
730e6056b7 r6024: Some of the ordering constraints on the popt callbacks were getting
painful, so don't call lp_*() functions until the post stage (rather
than in the cli_credentails_init(), which is called in the pre stage),
and don't open the secrets.ldb looking for the machine account details
until we actually need them (well after popt is done, and we know we have the other things right).

Set the domain and realm, as well as the account and password for -P
(fetch machine password) operation.

Allow NETLOGON credentials to be stored in this structure - will allow
SCHANNEL to be made more generic.

Clarify why we don't do special checks for NULL pointers, particularly
in the anonymous check (it indicates a programmer error, not a
run-time condition).

Also make lib/credentials.c a little more consistant.

Andrew Bartlett
2007-10-10 13:11:15 -05:00
Jelmer Vernooij
0559f22bbe r6019: Add IDL and server side code for Test_DoublePointer 2007-10-10 13:11:15 -05:00
Jelmer Vernooij
ed11601aef r6018: Add idl and server side for Test_Surrounding 2007-10-10 13:11:14 -05:00
Jelmer Vernooij
e33397f383 r6015: Add testprogs/ directory and original rpcecho sources
( from tridges junkcode at http://samba.org/ftp/unpacked/junkcode/rpcecho-win32 )
2007-10-10 13:11:14 -05:00
Andrew Bartlett
5c3e4df804 r6010: Change the testing order, so we test all transports for each binding
option, rather than all binding options for each transport.

This means that we get to most of the tests earlier, with at least
some binding options.  (And allows us to have some confidence before
waiting for an RPC-SAMR test to finish with bigendian).

Andrew Bartlett
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
618dadb7ef r6000: add some notes about the cases where compression (or what ever this is)
is used, in the reply.

metze
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
3d3e09af16 r5999: ups, remove the testvalue that I used against my w2k3 server
metze
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
f8add2e66a r5998: I was wrong with the highwater mark...
I think I now understand how it works:-)

metze
2007-10-10 13:11:14 -05:00
Andrew Bartlett
d6c80ff74b r5992: Rename schannel.c -> schannel_sign.c. The rest of the schannel code
(from librpc) will be moved into schannel.c soon.

Andrew Bartlett
2007-10-10 13:11:13 -05:00
Jelmer Vernooij
b48a0af0b0 r5989: Display authentication information (list of available auth protocols
+ principal names per endpoint) to gepdump. Still need to fix memory management
in the GTK+ utilities...
2007-10-10 13:11:13 -05:00
Andrew Bartlett
e13c671619 r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
642ec7cbef r5987: Add credentials callback for gtk+. The gtk+ apps now no longer
ask for a password when kerberos is being used.
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
f3006e623b r5986: Fix the build. Metze, could you please verify that this fix is correct? 2007-10-10 13:11:12 -05:00
Andrew Bartlett
84b566a36b r5985: Actually adding auth_domain.c in -r 5983 would probably have been a
good idea....

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Andrew Bartlett
41dea45892 r5984: Add index and attributes to default ldif for secrets.ldb
Andrew Bartlett
2007-10-10 13:11:12 -05:00
Andrew Bartlett
858cbfb821 r5983: Start support for being a domain member in Samba4.
This adds the auth_domain module to the auth subsystem, and cleans up
some small details around the join process (ensuring all the right
info is in the DB).

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
6149bd3702 r5980: Fix double free after unexpected disconnect. 2007-10-10 13:11:12 -05:00
Jelmer Vernooij
4089d5f67d r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes the
Test_DoublePointer test failure.
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
ec1eaa274b r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
28914c89dc r5963: Fix parameter passing for gentest and locktest 2007-10-10 13:11:11 -05:00
Stefan Metzmacher
adefeeb4f3 r5949: give things more meaning, and reuse structs where it is possible
to make things more clear

metze
2007-10-10 13:11:11 -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
d51718ab8a r5942: A couple of small changes to fix things up with the new credentials
infrustructure.

Andrew Bartlett
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
Stefan Metzmacher
08d4c3b9f8 r5940: fix schannel against w2k, it skips the confounder in the signature (24 bytes) for singed packets
but it accepts 32 bytes from the client.

(w2k3 accept it the otherway arround too)

metze
2007-10-10 13:11:10 -05:00
Andrew Tridgell
301cbb0d12 r5939: improve talloc_realloc() docs after feedback from lifeless 2007-10-10 13:11:10 -05:00
Andrew Tridgell
3060b26c9e r5938: - allow NULL string argument to talloc_vasprintf_append()
- default to using va_copy(), thus assuming a modern libc
2007-10-10 13:11:10 -05:00
Andrew Tridgell
e25aa54e96 r5937: - performance improvement to talloc_asprintf_append()
- allow standalone talloc to use gcc printf attributes
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
a0233a3a9a r5932: Use cli_credentials somewhat more in the Gtk+ code
Support ncacn_spx in DCE/RPC bindings.
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
f8cf161e0e r5930: Fix initialisation of dcerpc_binding->authservice 2007-10-10 13:11:10 -05:00
Jelmer Vernooij
4ad481cfe5 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
2007-10-10 13:11:09 -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
Jelmer Vernooij
e5bc6f4f17 r5924: Use cli_credentials in libnet/. 2007-10-10 13:11:08 -05:00
Jelmer Vernooij
1d49b57c50 r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
d60cb643e8 r5906: Fix the usage of the internal popt (make proto should ignore it)
Updated included popt to 1.7.
2007-10-10 13:11:08 -05:00
Andrew Bartlett
7e1d82a200 r5903: While I can't test IPv6, metze asked me to commit a matching change
for unknown hosts that I just did for IPv4.

Andrew Bartlett
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
d585e1a759 r5901: Add another option to the test script - the realm, which must match
the real ream, not just the short domain name.

Andrew Bartlett
2007-10-10 13:11:07 -05:00
Andrew Bartlett
a6c502832c r5900: Use flatname to specify the netbios domain name (matches what win2k3
uses for trusted domain records) in the secrets join records.

Andrew Bartlett
2007-10-10 13:11:07 -05:00
Andrew Bartlett
50af206477 r5899: Fix spelling.
Andrew Bartlett
2007-10-10 13:11:07 -05:00
Andrew Bartlett
6b8b40f73b r5898: Handle errors in the 'sync' name and IP address handling code.
Andrew Bartlett
2007-10-10 13:11:07 -05:00
Andrew Bartlett
a16339729d r5895: Remove old auth_domain code - to be replaced with entirely new implementation.
Andrew Bartlett
2007-10-10 13:11:06 -05:00