1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

346 Commits

Author SHA1 Message Date
Andrew Bartlett
f16d8f4eb8 s3-auth Use struct auth3_session_info outside the auth subsystem
This seperation between the structure used inside the auth modules and
in the wider codebase allows for a gradual migration from struct
auth_serversupplied_info -> struct auth_session_info (from auth.idl)

The idea here is that we keep a clear seperation between the structure
before and after the local groups, local user lookup and the session
key modifications have been processed, as the lack of this seperation
has caused issues in the past.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Andreas Schneider
f0361924fb s3-rpc_server: Replace client_id in dcerpc gssapi server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:08 +10:00
Andreas Schneider
7acaf405e4 s3-rpc_server: Remove unused client_id in srv_pipe.c.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:06 +10:00
Andreas Schneider
45f70db010 s3-auth: Added remote_address to ntlmssp server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:00 +10:00
Andreas Schneider
89ced2cc49 s3-rpc_server: Fix debug messages. 2011-06-01 12:02:15 +02:00
Andreas Schneider
438b24a77f s3-rpc_server: Remove guessing of the syntax id.
This is only a wild guess. We don't know to which rpc service the client
wants to talk until we read the the rpc bind packet.
2011-06-01 12:02:15 +02:00
Andreas Schneider
7d800a8694 s3-rpc_server: Use the correct syntax id for debugging. 2011-06-01 12:02:15 +02:00
Andreas Schneider
58485afd91 s3-rpc_server: Use the context syntax id in api_pipe_request(). 2011-06-01 12:02:15 +02:00
Andreas Schneider
c8ec695cb3 s3-rpc_server: Use the correct syntax id in api_pipe_bind_req(). 2011-06-01 12:02:15 +02:00
Andreas Schneider
34a600a27f s3-rpc_server: Move the context functions to own file. 2011-06-01 12:02:15 +02:00
Andreas Schneider
e39e09ffb5 s3-rpc_server: Store the ndr syntax id in the pipe context.
The client tell us in the rpc bind to which rpc service it wants to
connect. We did set the p->syntax earlier by guessing to which pipe name
it connects, but we don't know to which rpc service it wants to bind
until we read the first packet.
2011-06-01 12:02:15 +02:00
Günther Deschner
56cd3b3bbb s3-rpc_server: (re)move last globally included rpc_server prototypes.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May  2 16:05:31 CEST 2011 on sn-devel-104
2011-05-02 16:05:31 +02:00
Günther Deschner
61cd1067ef s3-smbd: avoid using pipes_struct when only session_info is needed.
Guenther
2011-05-02 15:03:43 +02:00
Andrew Bartlett
a3ef974d30 s3-rpc_server Remove comment, yes the key is correct.
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr  4 13:31:52 CEST 2011 on sn-devel-104
2011-04-04 13:31:52 +02:00
Andrew Bartlett
77e67163da s3-auth consolidate create_local_token() into make_server_info_krb5()
This ensures that all callers don't need to each add builtin groups
and privileges to the user's token

Andrew Bartlett
2011-04-04 19:48:58 +10: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
20d8ae49b7 s3: rpc_server needs parts of smbd.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Andreas Schneider
da718a5961 s3-epmapper: Use DCERPC_AUTH_LEVEL_CONNECT for ep ncalrpc. 2011-03-23 17:19:22 +01:00
Andreas Schneider
3766f3ec0e s3-rpc_server: Rename system_user to ncalrpc_as_system. 2011-03-23 17:19:22 +01:00
Günther Deschner
f0d59bb3cf s3-rpc_server: handle DCERPC_AUTH_LEVEL_CONNECT in api_pipe_bind_req().
Guenther
2011-03-09 12:27:25 +01:00
Andreas Schneider
a955c53843 s3-rpc_server: Free unused memory.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:31 +01:00
Andreas Schneider
4b8dd08a38 s3-rpc_server: Add server support for NCALRPC system user pipe.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:30 +01:00
Andrew Bartlett
9900aa4fb4 s3-rpc_server Handle session key as a constant buffer
This way, we don't have to check for memory allocation failures.

Andrew Bartlett
2011-03-01 06:29:03 +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
Andrew Bartlett
2b05ba77b4 s3-auth Rename cryptic 'ptok' to security_token
This will allow the auth_serversupplied_info struct to be migrated
to auth_session_info easier.

Adnrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Simo Sorce
76f249fb44 s3-dcerps: check auth_type
make sure the auth type used throught the auth operation is consistent.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:25 -07:00
Simo Sorce
b11fff1f48 s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an
accessor function to free data anymore.

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
0ec3720573 srv_pipe: reorganize code so that related functions are close to each other
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -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
b475cfd0b2 s3-dcerpc: use new spnego server code
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
62d7226b78 s3-dcesrv: use gssapi helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
8efd31ccad s3-dcesrv: use ntlmssp helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:46 -07:00
Simo Sorce
4194383cfe gssapi: remove unused function argument
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -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
2a2557075e s3-dcerpc: Implement DCERPC_AUTH_TYPE_KRB5 server side
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:35:02 +02:00
Günther Deschner
7b6fc9f414 s3-dcerpc: only include rpc_dce.h where needed.
Guenther
2010-08-26 00:20:29 +02:00
Simo Sorce
9b8c7d47f9 s3-dcerpc: Remove unused function 2010-08-17 06:33:13 -04:00
Simo Sorce
7b12513d12 s3-dcerpc: make a few local functions as static 2010-08-17 06:33:13 -04:00
Stefan Metzmacher
cc6951243d s3:rpc_server: fix valgrind warning
metze
2010-08-08 11:05:17 +02:00
Günther Deschner
64b26affe0 s3-dcerpc: fix some uninitialized variables build warnings.
Guenther
2010-08-03 15:57:56 +02:00
Simo Sorce
57bd974e58 s3-dcerpc: Use dcerpc_guess_sizes in the server code too. 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
2463a87177 s3-dcerpc: Use dcerpc_AuthType in pipe_auth_data 2010-07-28 12:19:32 -04:00
Simo Sorce
bfe53d4145 s3-dcerpc: Set flags directly instead of calling unimplemented functions. 2010-07-28 12:18:19 -04:00
Simo Sorce
9565e3f6a7 s3-dcerpc: Make dcerpc_check_auth() common code 2010-07-28 12:17:41 -04:00
Simo Sorce
5f2cca6b2a s3-dcerpc: Add the same paranoia checks we have in the client code 2010-07-28 12:17:18 -04:00