1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-23 11:33:16 +03:00
Commit Graph

55 Commits

Author SHA1 Message Date
Jelmer Vernooij
2f29f80e07 r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange. 2008-01-01 16:12:15 -06:00
Jelmer Vernooij
8858cf3972 r26440: Remove more uses of global_loadparm. 2007-12-21 05:50:08 +01:00
Jelmer Vernooij
28b1d36551 r26432: Require ndr_pull users to specify iconv_convenience. 2007-12-21 05:50:02 +01:00
Jelmer Vernooij
7352206f44 r26431: Require ndr_push creators to specify a iconv_convenience context. 2007-12-21 05:50:00 +01:00
Jelmer Vernooij
1b947fe0e6 r26430: require explicit specification of loadparm context. 2007-12-21 05:49:58 +01:00
Jelmer Vernooij
fc1f4d2d65 r26296: Store loadparm context in DCE/RPC server context. 2007-12-21 05:48:13 +01:00
Jelmer Vernooij
b9e3a4862e r26260: Store loadparm context in gensec context. 2007-12-21 05:47:34 +01:00
Stefan Metzmacher
6223c7fddc r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
2007-12-21 05:45:02 +01:00
Jelmer Vernooij
b7371f1a19 r25553: Convert to standard bool type. 2007-10-10 15:07:54 -05:00
Jelmer Vernooij
3fcc960839 r25398: Parse loadparm context to all lp_*() functions. 2007-10-10 15:07:25 -05:00
Jelmer Vernooij
31993cf67b r24780: More work allowing libutil to be used by external users. 2007-10-10 15:03:10 -05:00
Andrew Bartlett
52cce94532 r24504: Try to return more useful error information on why a bind failed.
Note that the correct return for a failed alter_context is a fault,
not a bind_nak.

Andrew Bartlett
2007-10-10 15:02:03 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Andrew Bartlett
2b569c42e0 r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
2007-10-10 14:25:00 -05:00
Andrew Tridgell
e3c04cf165 r19502: fixed the RPC-SECRETS test with kerberos. Andrew, can you look at this
as well?

The server side change is needed to fix a valgrind error, which was
possibly exploitable if the client sent deliberately bad data
2007-10-10 14:24:40 -05:00
Andrew Bartlett
bd1e0f679c r19465: Rather than use the non-standard API for determining the signature
length, use the amount the wapped message expanded by.

This works, because GSSAPI doesn't do AEAD (signing of headers), and
so changing the signature length after the fact is valid.

Andrew Bartlett
2007-10-10 14:21:37 -05:00
Stefan Metzmacher
679ac74e71 r17341: pass a messaging context to auth_context_create()
and gensec_server_start().

calling them with NULL for event context or messaging context
is no longer allowed!

metze
2007-10-10 14:15:17 -05:00
Andrew Tridgell
ca6ae1afa0 r12554: get rid of the pesky NTLMSSP warnings about being called after processing is finished 2007-10-10 13:47:57 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Andrew Bartlett
205f77c579 r11200: Reposition the creation of the kerberos keytab for GSSAPI and Krb5
authentication.  This pulls the creating of the keytab back to the
credentials code, and removes the special case of 'use keberos keytab
= yes' for now.

This allows (and requires) the callers to specify the credentials for
the server credentails to GENSEC.  This allows kpasswdd (soon to be
added) to use a different set of kerberos credentials.

The 'use kerberos keytab' code will be moved into the credentials
layer, as the layers below now expect a keytab.

We also now allow for the old secret to be stored into the
credentials, allowing service password changes.

Andrew Bartlett
2007-10-10 13:45:00 -05:00
Andrew Bartlett
e4f2afc343 r10153: This patch adds a new parameter to gensec_sig_size(), the size of the
data to be signed/sealed.  We can use this to split the data from the
signature portion of the resultant wrapped packet.

This required merging the gsskrb5_wrap_size patch from
lorikeet-heimdal, and fixes AES encrption issues on DCE/RPC (we no
longer use a static 45 byte value).

This fixes one of the krb5 issues in my list.

Andrew Bartlett
2007-10-10 13:38:04 -05:00
Andrew Bartlett
093b98b5b5 r9490: Fix typo
Andrew Bartlett
2007-10-10 13:34:21 -05:00
Jelmer Vernooij
fac77f5fa2 r8811: Fix the build.. 2007-10-10 13:30:07 -05:00
Andrew Bartlett
bc8f8d2dcf r8109: Try to print out more helpful debug messages on DCERPC server-side
gensec failure to start.

Andrew Bartlett
2007-10-10 13:19:09 -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
Jelmer Vernooij
875cce1268 r7313: Prefix a few functions with ncacn_ rather then dcerpc_ because they are
ncacn_ specific
2007-10-10 13:17:41 -05:00
Jelmer Vernooij
2009a430b0 r7312: Add IDL for ncadg packets. 2007-10-10 13:17:40 -05:00
Andrew Bartlett
c023f5c5e8 r6457: Simply the RPC server code for the choice of GENSEC mech - it's just
one function call now, so no need for a wrapper function.

Andrew Bartlett
2007-10-10 13:11: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 Tridgell
439cbb9ead r4663: fixed SPNEGO auth in the rpc server 2007-10-10 13:08:40 -05:00
Andrew Tridgell
b6af57c868 r4642: added support for alter_context in the server for adding new interfaces to an existing pipe 2007-10-10 13:08:38 -05:00
Stefan Metzmacher
ab6ec6b5f4 r4082: support alter_context requests
metze
2007-10-10 13:06:25 -05:00
Stefan Metzmacher
5d7d6f02cf r4081: use clearer names
metze
2007-10-10 13:06:24 -05:00
Andrew Tridgell
729e0026e4 r3468: split out dcerpc_server.h 2007-10-10 13:05:17 -05:00
Andrew Tridgell
f12ee2f241 r2629: convert gensec to the new talloc model
by making our gensec structures a talloc child of the open connection
we can be sure that it will be destroyed when the connection is
dropped.
2007-10-10 12:59:14 -05:00
Andrew Tridgell
76d0b8206c r2627: use the new talloc capabilities in a bunch more places in the rpc
server code. This fixes a number of memory leaks I found when testing
with valgrind and smbtorture, as the cascading effect of a
talloc_free() ensures that anything derived from the top level object
is destroyed on disconnect.
2007-10-10 12:59:13 -05:00
Andrew Tridgell
fee98137ad r2615: fixed a bug in the server side support for CONNECT level security 2007-10-10 12:59:12 -05:00
Andrew Tridgell
f4660857bc r2614: support CONNECT level DCE/RPC security in both client and
server. CONNECT security uses NTLMSSP, but does not do any signing or
sealing (or equivalently, its like signing, but with a zero filled
checksum).
2007-10-10 12:59:12 -05:00
Andrew Tridgell
fce7a4218b r2294: this fixes the NTLM2 sign+seal combination. I have now tested:
NTLM sign
 NTLM sign+seal
 NTLM2 sign
 NTLM2 sign+seal

and all of the above both with and without key exchange

the NTLM2 seal case is ugly and involves an extra data copy, which
some API changes in gensec or the ndr layer might avoid in future.
2007-10-10 12:58:40 -05:00
Andrew Tridgell
d8825b69ac r2293: fixed older NTLM sign/seal in the server 2007-10-10 12:58:40 -05:00
Andrew Bartlett
b80d849b6b r2290: Fix 'lsakey' for the server-side, it is static for
'authenticated' connections.

Fix kerberos session key issues - we need to call the
routine for extracting the session key, not just read the cache.

Andrew Bartlett
2007-10-10 12:58:40 -05:00
Andrew Bartlett
a1fe175eec r2284: Thanks to some great detective work by tridge, NTLM2 signing now works.
This means that 'require NTLMv2 session security' now works for RPC
pipe signing.  We don't yet have sealing, but it can't be much further.

This is almost all tridge's code, munged into a form that can work
with the GENSEC API.

This commit also includes more lsakey fixes - that key is used for all
DCE-RPC level authenticated connections, even over CIFS/ncacn_np.

No doubt I missed something, but I'm going to get some sleep :-)

Andrew Bartlett
2007-10-10 12:58:39 -05:00
Andrew Bartlett
7be16e5036 r2281: Add a few comments. 2007-10-10 12:58:38 -05:00
Andrew Bartlett
86f61568ea r2041: Fix NTLMSSP RPC sealing, client -> win2k3 server.
The bug (found by tridge) is that Win2k3 is being tighter about the
NTLMSSP flags.  If we don't negotiate sealing, we can't use it.

We now have a way to indicate to the GENSEC implementation mechanisms
what things we want for a connection.

Andrew Bartlett
2007-10-10 12:58:19 -05:00
Andrew Bartlett
07fd885fd4 r1294: A nice, large, commit...
This implements gensec for Samba's server side, and brings gensec up
to the standards of a full subsystem.

This means that use of the subsystem is by gensec_* functions, not
function pointers in structures (this is internal).  This causes
changes in all the existing gensec users.

Our RPC server no longer contains it's own generalised security
scheme, and now calls gensec directly.

Gensec has also taken over the role of auth/auth_ntlmssp.c

An important part of gensec, is the output of the 'session_info'
struct.  This is now reference counted, so that we can correctly free
it when a pipe is closed, no matter if it was inherited, or created by
per-pipe authentication.

The schannel code is reworked, to be in the same file for client and
server.

ntlm_auth is reworked to use gensec.

The major problem with this code is the way it relies on subsystem
auto-initialisation.  The primary reason for this commit now.is to
allow these problems to be looked at, and fixed.

There are problems with the new code:
- I've tested it with smbtorture, but currently don't have VMware and
  valgrind working (this I'll fix soon).
- The SPNEGO code is client-only at this point.
- We still do not do kerberos.

Andrew Bartlett
2007-10-10 12:56:49 -05:00
Andrew Tridgell
9b397356ae r1168: fixed a little-endian/big-endian mixup in the rpc server code 2007-10-10 12:56:43 -05:00
Andrew Tridgell
2ac79dfba0 r1030: added server side schannel support 2007-10-10 12:56:30 -05:00
Stefan Metzmacher
d09abeb686 r1004: continue tridge's work on dcerpc server auth/crypto code
I made it much more generic, and we should be able to add a
module interface to this code, so that other DCERPC_AUTH types can be added
via modules...

metze
2007-10-10 12:56:25 -05:00
Andrew Tridgell
729b2f41c9 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.
2007-10-10 12:56:25 -05:00
Andrew Bartlett
399e2e2b11 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
2007-10-10 12:56:14 -05:00