Andrew Bartlett
bd29f79463
s3-ntlmssp use gensec_{seal,unseal,sign,check}_packet
...
This avoids the indirection via the auth_ntlmsssp wrapper functions.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:23 +02:00
Andrew Bartlett
0c6e4adcb2
ntlmssp: Move ntlmssp code to auth/ntlmssp
...
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Simo Sorce
d1bc22eeb3
s3-rpc_server: Use rpc_epmapper_mode() in ep_register()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:03 -04:00
Andrew Bartlett
7b1d6a6a05
selftest: test plugin_s4_dc against all ncacn_np tests
...
Changes to the s3 epmapper behaviour seem to have fixed the rest of these
tests.
Andrew Bartlett
2011-08-03 18:48:05 +10:00
Andrew Bartlett
d3fe48ba48
gensec: Remove mem_ctx from calls that do not return memory
...
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Andreas Schneider
4b751b29e5
s3-librpc: Remove obsolete dcerpc_binding_vector_create().
2011-08-01 08:50:35 +02:00
Andreas Schneider
02cdb65fc6
s3-librpc: Add dcerpc_binding_vector_replace_iface().
2011-08-01 08:50:35 +02:00
Andreas Schneider
9cc6f90424
s3-librpc: Add dcerpc_binding_vector_dup().
2011-08-01 08:50:35 +02:00
Andreas Schneider
169d0c4312
s3-librpc: Add dcerpc_binding_vector_add_unix().
2011-08-01 08:50:35 +02:00
Andreas Schneider
eaced2e909
s3-librpc: Add dcerpc_binding_vector_add_port().
2011-08-01 08:50:35 +02:00
Andreas Schneider
c810e47519
s3-librpc: Add dcerpc_binding_vector_add_np_default().
2011-08-01 08:50:35 +02:00
Andreas Schneider
08523ed6b8
s3-librpc: Add dcerpc_binding_vector_new().
2011-08-01 08:50:34 +02:00
Andreas Schneider
c69f2c4de9
s3-librpc: Pass messaging context to dcerpc register functions.
2011-07-14 16:10:47 +02:00
Andreas Schneider
541f3cf639
s3-rpc_server: Migrate rpc function to tsocket_address.
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:58 +10:00
Andrew Bartlett
74eed8f3ed
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
...
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
c615ebed6e
s3-lib Replace StrCaseCmp() with strcasecmp_m()
...
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.
Andrew Bartlett
2011-05-18 16:12:08 +02:00
Günther Deschner
0bb4701a74
s3: remove various references to server side dcerpc structs (which are not needed).
...
Guenther
2011-05-02 15:03:44 +02:00
Günther Deschner
80fa624861
s3: move pipe_auth_data to dcerpc.h
...
Guenther
2011-05-02 15:03:44 +02:00
Günther Deschner
bc781bf7d9
s3-proto: remove duplicate prototypes.
...
Guenther
2011-04-29 21:01:05 +02:00
Günther Deschner
faf1175125
s3-proto: move more librpc prototypes to librpc/rpc/dcerpc.h
...
Guenther
2011-04-29 21:01:04 +02:00
Günther Deschner
bc6f24e89f
s3-build: remove some unused headers.
...
Guenther
2011-04-29 12:19:03 +02:00
Günther Deschner
f102748061
s3-librpc: let librpc/rpc/dcerpc.h include ndr and generated dcerpc headers.
...
Guenther
2011-04-12 12:20:43 +02:00
Günther Deschner
6e3f0d28a4
s3-includes: only include ntdomain.h where needed.
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
146c1aac99
s3-auth: rpc_server needs auth.h
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
b903c28939
librpc: bring more librpc prototypes in common.
...
Guenther
2011-03-23 23:59:11 +01:00
Andreas Schneider
73faa82bf9
s3-rpc_server: Implement an endpoint monitor loop.
2011-03-23 17:19:22 +01:00
Andreas Schneider
81a2046879
s3-librpc: Leave the epm registration connection open.
2011-03-23 17:19:22 +01:00
Stefan Metzmacher
72c1fe0081
librpc/rpc: move DCERPC_ flags to rpc_common.h
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar 13 20:45:53 CET 2011 on sn-devel-104
2011-03-13 20:45:53 +01:00
Stefan Metzmacher
f7840b3293
s3:librpc/rpc: add DCERPC_ANON_FALLBACK flag
...
With this they're in sync with source4.
metze
2011-03-13 19:24:57 +01:00
Stefan Metzmacher
08dca92499
librpc/rpc: move struct dcerpc_binding to rpc_common.h
...
metze
2011-03-13 16:53:05 +01:00
Stefan Metzmacher
7b7baecf1a
s3:librpc/rpc: add target_principal to struct dcerpc_binding
...
This brings the source3 copy in sync with the source4 copy
of struct dcerpc_binding.
metze
2011-03-13 16:52:59 +01:00
Stefan Metzmacher
83c55ac67e
librpc/rpc: move enum dcerpc_transport_t to rpc_common.h
...
metze
2011-03-13 16:33:06 +01:00
Stefan Metzmacher
b738e092a2
librpc/rpc: move dcerpc_binding_handle stuff to rpc_common.h
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar 11 12:28:08 CET 2011 on sn-devel-104
2011-03-11 12:28:08 +01:00
Stefan Metzmacher
5657c96714
s3:librpc/rpc: remove unused dcerpc_pipe define hack
...
metze
2011-03-11 11:02:24 +01:00
Günther Deschner
d92e060dd9
s3-epmap: fix uninitialized variable in ep_register()
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:31 +01:00
Andreas Schneider
ce491edcad
s3-librpc: Register NCALRPC pipes.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:30 +01:00
Andreas Schneider
cc5b88545d
s3-rpc_server: Introduce transport in pipe_struct.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:30 +01:00
Andreas Schneider
148ed2c3f9
s3-librpc: Register endpoints using ncalrpc.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:29 +01:00
Andreas Schneider
d343409d6b
s3-rpc_client: Added DCERPC_AUTH_TYPE_NCALRPC bind.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:29 +01:00
Andreas Schneider
c80e519cdc
s3-librpc: Free memory we don't need.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:28 +01:00
Andreas Schneider
a45353b3e2
s3-librpc: Added tcpip support for dcerpc_binding_vector_create.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:28 +01:00
Andreas Schneider
bf18403c81
s3-rpc_client: Move client pipe functions to own header.
2011-02-28 18:15:04 +01:00
Andrew Bartlett
2e69e89456
s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
...
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.
The structure is also not ideal for it's current purpose. Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session. This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.
(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Andreas Schneider
59f7bcbc39
s3-librpc: Only register NCACN_NP.
...
This is the only transport we support at the moment.
2011-02-21 23:00:02 +01:00
Günther Deschner
b3ea56ae16
s3-librpc: no need to globally include endpointmapper headers.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb 14 12:31:56 CET 2011 on sn-devel-104
2011-02-14 12:31:56 +01:00
Günther Deschner
9d9659896b
s3-librpc: remove duplicate prototypes.
...
Guenther
2011-02-14 11:47:19 +01:00
Jeremy Allison
40850b3b27
Fix a couple of missing checks on talloc returns.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb 2 22:23:46 CET 2011 on sn-devel-104
2011-02-02 22:23:46 +01:00
Günther Deschner
586b2ee826
s3-epmap: use correct dcerpc client header in dcerpc_ep.c
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb 2 19:50:02 CET 2011 on sn-devel-104
2011-02-02 19:50:02 +01:00
Andreas Schneider
31779662b7
s3-librpc: Added dcerpc_binding_vector_create function.
2011-02-02 12:44:20 +01:00
Andreas Schneider
20afe97177
s3-librpc: Added dcerpc register endpoint functions.
2011-02-02 12:44:20 +01:00
Stefan Metzmacher
b7d6d3b840
s3:librpc: remove prototype of dcerpc_binding_handle_set_ref_alloc()
...
This function doesn't exist anymore.
metze
2011-01-21 07:21:10 +01:00
Stefan Metzmacher
2d466b41cd
s3:librpc: use netsec_outgoing_sig_size() instead of a hardcoded signature
...
size
metze
2011-01-03 16:44:29 +01:00
Simo Sorce
926a3f4fcd
s3-dcerpc: Use spnego own sign/seal functions
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
3453bc7b11
s3-dcerpc: make auth context opaque
...
This way we always double check in advance that the context
is of the right type with talloc_get_type_abort instead of
potentially accessing random memory by addressing the wrong
structure in the union.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
d10e192b83
s3-dcerpc: finally remove the legaqcy spnego_type variable from pipe_auth_data
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
2c9f420d75
s3-dcerpc: move client spnego stuff in /librpc/crypto
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
59722ef2fb
spnego: avoid explicit dependency on dcerpc specific structures
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
412ebad02b
gssapi: avoid explicit dependency on dcerpc specific structures
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
0e5eb82a6f
s3-dcerpc: move crypto stuff in /librpc/crypto
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
f7f9916dc7
s3-rpc_server: Added helper functions to read data from a ncacn socket.
...
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:42 +02:00
Julien Kerihuel
e5e5a1110f
Add unique IP address binding for client connections (EPM and ncacn_ip_tcp levels)
...
This allows for binding strings like this:
ncacn_ip_tcp:host[localaddress=192.168.2.1,seal]
which will force the connection to be locally bound to the specified
IP address
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-07 09:55:14 +10:00
Stefan Metzmacher
54d2dce7b1
librpc/rpc: add dcerpc_binding_handle_set_timeout()
...
metze
2010-09-04 09:01:19 +02:00
Stefan Metzmacher
27918981de
librpc/rpc: add set_timeout() to dcerpc_binding_handle_ops
...
metze
2010-09-04 09:01:11 +02:00
Simo Sorce
804aaad526
s3-kerberos: use krb5 compat macros in fill_keytab_from_password()
...
This one uses the compat macro in the right way, without actually
breaking the code.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-02 22:48:09 +02:00
Simo Sorce
d9c63fbe92
Revert "s3-kerberos: use krb5 compat macros in fill_keytab_from_password()."
...
This reverts commit 9986d25ed1
.
This patch was causing us to free unallocated memory.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-02 22:48:09 +02:00
Günther Deschner
d8c9756d53
s3-kerberos: use more krb5 compat macros in get_mem_keytab_from_secrets().
...
Guenther
2010-08-31 23:17:39 +02:00
Günther Deschner
765bee9d7a
s3-kerberos: use smb_get_enctype_from_kt_entry() in
...
get_mem_keytab_from_secrets().
Guenther
2010-08-31 23:17:39 +02:00
Günther Deschner
e26a936333
s3-kerberos: use get_kerberos_allowed_etypes in fill_keytab_from_password().
...
Guenther
2010-08-31 23:17:39 +02:00
Günther Deschner
9986d25ed1
s3-kerberos: use krb5 compat macros in fill_keytab_from_password().
...
Guenther
2010-08-31 23:17:39 +02:00
Günther Deschner
3d78279fd4
s3-kerberos: fix flush_keytab() compile with heimdal.
...
krb5_kt_cursor is not a pointer in heimdal but a struct.
Guenther
2010-08-31 23:17:39 +02:00
Günther Deschner
9697687e25
dcerpc-gssapi: include missing dcerpc_krb5.h header.
...
Guenther
2010-08-30 14:47:52 +02:00
Günther Deschner
d524f58518
dcerpc-gssapi: fix "shadows a global declaration" warning when gssapi is unavailable.
...
Guenther
2010-08-30 14:44:13 +02:00
Simo Sorce
36fdb211a6
dcerpc-gssapi: add function to retrieve client name
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:34:01 +02:00
Simo Sorce
d15d76af5f
dcerpc-gssapi: add function to extract authtime
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:33:14 +02:00
Simo Sorce
6c80e04120
dcerpc-gssapi: add function to extract authorization data (PAC) form gssapi context
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:33:01 +02:00
Simo Sorce
fb1aef085e
dcerpc-gssapi: add function to check flags
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:32:47 +02:00
Simo Sorce
e6ed1dc249
dcerpc-gssapi: add initial server side code
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:32:33 +02:00
Simo Sorce
b31f75d8f6
s3-dcerpc: add krb5 helpers
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:27:48 +02:00
Günther Deschner
3aab0c701c
s3-build: only include rpc_misc.h where needed.
...
Guenther
2010-08-26 00:26:01 +02:00
Stefan Metzmacher
5d7c27cb5b
s3:librpc: make dcerpc_read_ncacn_packet_send/recv() available
...
metze
2010-08-20 18:09:26 +02:00
Günther Deschner
16ad1bbb4e
s3-dcerpc: try to fix the non gssapi build.
...
Guenther
2010-08-17 13:18:34 +02:00
Günther Deschner
36cfadcf6a
s3-dcerpc: fix c++ build warning.
...
Guenther
2010-08-17 13:06:36 +02:00
Simo Sorce
86914b8fab
s3-dcerpc: properly implement gse/spnego_get_session_key
2010-08-17 06:33:13 -04:00
Simo Sorce
72a0098415
s3-dcerpc: Pull packet in the caller, before validation
2010-08-17 06:33:13 -04:00
Günther Deschner
bb8936c087
s3-dcerpc: fix build warning seen with -O3.
...
"warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false"
Guenther
2010-08-13 15:20:58 +02:00
Stefan Metzmacher
2c0e296dd7
s3:rpc_client: add dcerpc_binding_handle backend
...
metze
2010-08-12 14:31:21 +02:00
Günther Deschner
64b26affe0
s3-dcerpc: fix some uninitialized variables build warnings.
...
Guenther
2010-08-03 15:57:56 +02:00
Günther Deschner
322b524194
s3-build: fix some c++ build warnings.
...
Guenther
2010-08-02 12:05:03 +02:00
Simo Sorce
4c64e4d4af
s3-dceprc: Improve dcerpc_guess_sizes() interface
...
Make it possible to pass in the NDR padding size so that theoretically
client and server code can decide to use a different alignment.
Pass in the header length as a parameter so that this function can be used for
different type of packets.
Make sure padding size will not make the fragment exceed the maximum length.
Calculate padding taking in account the header length.
2010-07-30 14:55:28 -04:00
Simo Sorce
3469fbc5e4
s3-dcerpc: rationalize packet creation in the server code
...
Move all related functions into create_next_packet, but make it transport
neutral (not pass in pipse_struct)
2010-07-30 14:55:27 -04:00
Simo Sorce
a9d3a596a7
s3-dcerpc: Make function to guess pdu sizes common.
2010-07-30 14:55:27 -04:00
Simo Sorce
186f93633b
s3-dcerpc: use common spengo wrapper code for client SPNEGO/NTLMSSP
2010-07-30 14:55:27 -04:00
Simo Sorce
984438ca15
s3-dcerpc: add sign/seal support when using SPNEGO/KRB5
2010-07-30 14:55:27 -04:00
Simo Sorce
0b24e8e869
s3-dcerpc: Add SPNEGO incapsulation for KRB5 auth
2010-07-30 14:55:27 -04:00
Simo Sorce
e8ac4a8b82
s3-dcerpc: Try to fix build when gssapi_ext.h is not available
2010-07-28 17:12:57 -04:00
Simo Sorce
7c9c075987
Do not refernece pipe_auth_data directly in dcerpc_gssapi.c
2010-07-28 15:53:56 -04:00
Simo Sorce
7eaa15af2c
s3-dcerpc: Add sign/seal with gssapi
2010-07-28 12:42:15 -04:00
Simo Sorce
1abcbd70ae
s3-dcerpc: Add next authentication step with gssapi
2010-07-28 12:24:44 -04:00
Simo Sorce
135a82e78f
s3-decrpc: Introduce gssapi support for dcerpc krb5 auth
2010-07-28 12:24:44 -04:00
Simo Sorce
2463a87177
s3-dcerpc: Use dcerpc_AuthType in pipe_auth_data
2010-07-28 12:19:32 -04:00