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

4046 Commits

Author SHA1 Message Date
Andrew Tridgell
a6e492f95c r6086: default to stderr for error messages in ldb, so we get errors in ldb_connect() 2007-10-10 13:11:18 -05:00
Simo Sorce
55117f1ab9 r6085: dc is case insensitive 2007-10-10 13:11:18 -05:00
Simo Sorce
fb9afcaf53 r6084: - Introduce the samldb module dependency on samba4
- This module will take care of properly filling an user or group object
  with required fields. You just need to provide the dn and the objectclass
  and a user/group get created

  Simo.
2007-10-10 13:11:18 -05:00
Andrew Bartlett
258c04e367 r6079: Add inline documentation on the credentials context API.
Andrew Bartlett
2007-10-10 13:11:17 -05:00
Andrew Bartlett
6439de9ec8 r6078: Correctly fix the failures for NT1 (not SPNEGO) session setups in the
client.  The issue was actually a cut-and-paste bug, I was filling in
the .old not the .nt1 part of the union.

I've also removed the 'error checks' - I'll shortly document the API
for the credentials code to clarify that it will always return a
pointer here, except in cases of programmer error.

Tridge:  I hope this is OK.

Andrew Bartlett
2007-10-10 13:11:17 -05:00
Andrew Tridgell
40b8ee186a r6075: added talloc_enable_null_tracking() (asked for by lifeless) 2007-10-10 13:11:17 -05:00
Andrew Tridgell
ff6663aac8 r6074: fixed non-spnego connections for new credentials code 2007-10-10 13:11:17 -05:00
Jelmer Vernooij
7fe77cd659 r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed.
2007-10-10 13:11:17 -05:00
Stefan Metzmacher
fca4dc4827 r6065: revert test value
metze
2007-10-10 13:11:16 -05:00
Stefan Metzmacher
335adef370 r6061: add start of compression support in our rpc code
this is not complete cuurently...

but I want other people to test it and help me on finishing it.
(try to change the #if 0 in torture/rpc/drsuapi.c into #if 1)

metze
2007-10-10 13:11:16 -05:00
Jelmer Vernooij
6c3b1ec329 r6045: Couple of small GTK+ fixes
Use uint32_t and uint16_t rather then DWORD and WORD in
the NT4 backend. Add some more unknown fields..
2007-10-10 13:11:16 -05:00
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