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

83 Commits

Author SHA1 Message Date
Jeremy Allison
69e98ff86c Remove unused variable.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 24 02:01:00 CEST 2012 on sn-devel-104
2012-07-24 02:00:59 +02:00
Andrew Bartlett
11d7f7762d s3-rpc_server: Remove make_server_info_info3() call from make_server_pipes_struct()
This codepath would only be executed if we provided a partial session_info token
across the named pipe forwarding code.

The smbd file server always fills this in, and if the ntvfs file server ever
wants to use an smbd hosted pipe, it can do the same.  Calling create_local_token
is always the wrong thing to do.

Andrew Bartlett
2012-07-19 04:04:20 +02:00
Jelmer Vernooij
71d41a015a libreplace: Add getpeereid implementation. 2012-03-24 16:00:36 +01:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Andreas Schneider
a7d2437bc0 rpc_server: Improve debug message for sys_getpeereid().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Sep 15 19:23:43 CEST 2011 on sn-devel-104
2011-09-15 19:23:43 +02:00
Andreas Schneider
b8c3bfa55b s3-lib: If we create a pipe socket, don't start to listen.
The create_pipe_sock() function should only create the socket as the
name states and not start to listen on it too. We should start to listen
on in the individual places as we need different backlog values.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Aug 29 13:21:43 CEST 2011 on sn-devel-104
2011-08-29 13:21:43 +02:00
Andreas Schneider
b501f6f758 s3-rpc_server: Add create_dcerpc_ncalrpc_socket().
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:07 -04:00
Simo Sorce
11cbe24ac8 s3-rpc_server: Move config helpers in one place.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:03 -04:00
Simo Sorce
5a4e0dd853 s3-rpc_server: Add helper to define/retrieve daemons configuration
Wtith this set of helper functions we make it easy to configure if we want to
use an embedded rpc server, or if we want to fork one. Or even just disable it
and let a third party server be used when the service is configured as
"external".

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:03 -04:00
Andreas Schneider
e4b566d6cf s3-rpc_server: Make dcerpc_ncacn_accept() public.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Simo Sorce
a1394fc934 s3-rpc_server: add termination function
This way we can act when a client disconnects.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10 18:14:03 +02:00
Simo Sorce
d67fc9c1eb s3-rpc: Expose some internal functions
This will allow to hook the prefork socket handlers to the rpc service.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10 18:14:03 +02:00
Andreas Schneider
68d79eb6ef s3-rpc_server: Fix sending of packets over named pipe proxy.
We need for named pipes we need to send each fragment on its own to be a
message.

Signed-off-by: Simo Sorce <idra@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Tue Aug  9 11:55:18 CEST 2011 on sn-devel-104
2011-08-09 11:55:18 +02:00
Andreas Schneider
bc3fae70a2 s3-rpc_server: Free the children of p->mem_ctx.
Free the children of p->mem_ctx after processing a complete incoming and
outgoing request.

Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-09 10:41:47 +02:00
Andrew Bartlett
9a45bf3952 s3-auth set session_info->sanitized_username in create_local_token()
Rather than passing this value around the callers, and eventually
setting it in register_existing_vuid(), we simply pass it to
create_local_token().  This also removes the need for
auth_ntlmssp_get_username().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:04 +10:00
Andreas Schneider
cca96e4726 s3-rpc_server: Added common function to create tcpip socket. 2011-08-01 08:50:34 +02:00
Simo Sorce
0a72744dd2 s3-rpc_server: Remove dead code
srv_str and cli_str are not used anymore.
2011-07-28 10:27:45 -04:00
Simo Sorce
b19b05cd0a s3-rpc_server: Do not set msg_ctx twice
msg_ctx was already passed to make_base_pipes_struct,
no need to set it again.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Fri Jul 22 00:47:28 CEST 2011 on sn-devel-104
2011-07-22 00:47:28 +02:00
Andreas Schneider
fb2ee304a8 s3-rpc_server: Pass msg_ctx to make_base_pipes_struct().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 21 21:08:32 CEST 2011 on sn-devel-104
2011-07-21 21:08:31 +02:00
Simo Sorce
156a0ffe54 s3-rpc_server: Create common function to allocate pipes_struct
Avoid code duplication and fix bug where a new pipe was not added to
InternalPipes upon creation in make_server_pipes_struct()

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 21 19:50:02 CEST 2011 on sn-devel-104
2011-07-21 19:50:02 +02:00
Andreas Schneider
6a4a6efdc9 s3-rpc_server: Remove unused endpoint information. 2011-07-21 18:40:23 +02:00
Andreas Schneider
19288f9784 s3-rpc_server: Duplicate the pipe name. 2011-07-21 18:40:23 +02:00
Andreas Schneider
3a43ef52db s3-rpc_server: Free the np dir. 2011-07-21 18:40:22 +02:00
Andreas Schneider
304e8116a9 s3-rpc_server: Fix messaging context in the pipes struct. 2011-07-21 18:40:22 +02:00
Andreas Schneider
f5da8ed889 s3-rpc_server: Add my copyright. 2011-07-21 18:40:22 +02:00
Andrew Bartlett
03b153ce54 s3-rpc_server remove per-element copies of auth_session_info
This is not required any more now that they are the same structure,
and shows the value in having a common structure across the codebase.

In particular, now any additional state that needs to be added to the
auth_session_info will be transparently available across the named
pipe proxy, without a need to modify the mapping layer.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
9fcc617ff5 s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the
authorization data of a user across the whole codebase.

This will allow of our session handling to be accomplished with common code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
128ae06a61 s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_info
This makes auth3_session_info identical to auth_session_info

The logic to convert the info3 to a struct auth_user_info is
essentially moved up the stack from the named pipe proxy in
source3/rpc_server to create_local_token().

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
8d72e612ac s3-rpc_server read and write the unix_token and unix_info across named_pipe_auth
This ensures that the exact same token is used on both sides of the
pipe, when a full token is passed (ie, source3 to source3, but not yet
source4 to to source3 as the unix info isn't calculated there yet).

If we do not have unix_token, we fall back to the old behaviour and go
via create_local_token().  (However, in this case the security_token
is now overwritten, as it is better to have it match the rest of the
session_info create_local_token() builds).

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
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
Andrew Bartlett
55ad1da888 Add my copyright
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:09 +10:00
Andreas Schneider
df09511cf2 s3-rpc_server: Fixed segfaults in rpc daemons.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Jul 18 14:01:02 CEST 2011 on sn-devel-104
2011-07-18 14:01:02 +02:00
Andreas Schneider
8faee7bd9b s3-rpc_server: Pass event and messaging context to accept function.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Jul 14 17:22:16 CEST 2011 on sn-devel-104
2011-07-14 17:22:16 +02:00
Andreas Schneider
2bcbeea05e s3-rpc_server: Remove client_id and server_id from pipes struct.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:43 +10: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
Andreas Schneider
6ac68a803e s3-rpc_server: Add local and remote address to pipes struct.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:57 +10:00
Andreas Schneider
f086057ce8 s3-rpc_server: Remove syntax from pipes_struct. 2011-06-01 12:02:16 +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
Stefan Metzmacher
cb227d6d14 s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np with 0700
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 13:01:14 CEST 2011 on sn-devel-104
2011-05-17 13:01:14 +02:00
Stefan Metzmacher
e0624f773c Revert "s3-rpc_server: Force ncalrpc dir to be mode 755."
This reverts commit a032c9c8fe.
2011-05-17 11:57:23 +02:00
Andreas Schneider
a032c9c8fe s3-rpc_server: Force ncalrpc dir to be mode 755.
This completes aae9353ecf.

directory_create_or_exist() is not needed cause create_pipe_sock() takes
care of setting up the directory correctly.

Andrew please check!

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon May 16 17:54:20 CEST 2011 on sn-devel-104
2011-05-16 17:54:20 +02:00
Andrew Bartlett
aae9353ecf ncalrpc: Force ncalrpc dir to be mode 755 in all users
This allows this directory to be shared between Samba3 and Samba4 in a
Franky-style setup easily.

Andrew Bartlett
2011-05-08 19:00:29 +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
0e76eddcc8 s3: include ntdomain.h before including generated srv_ headers.
Guenther
2011-05-02 15:03:44 +02:00
Günther Deschner
047d8c073b s3-proto: move more rpc_server prototypes out of proto.h
Guenther
2011-05-02 15:03:43 +02:00
Günther Deschner
bbacaec4e9 s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 22:05:07 CEST 2011 on sn-devel-104
2011-04-29 22:05:07 +02:00
Andrew Bartlett
663dc94e63 auth: Move auth_session_info into IDL
This changes auth_session_info_transport to just be a wrapper, rather
than a copy that has to be kept in sync.

As auth_session_info was already wrapped in python, this required
changes to the existing pyauth wrapper and it's users.

Andrew Bartlett
2011-04-05 23:46:04 +02:00
Andrew Bartlett
ff9b6682a0 s3-auth Rename user_session_key -> session_key to match auth_session_info 2011-04-05 06:32:07 +10:00
Andrew Bartlett
17d8f0ad30 s3-auth use create_local_token() to transform server_info -> session_info
Before a auth_serversupplied_info struct can be used for
authorization, the local groups and privileges must be calculated.
create_local_token() now copies the server_info, and then sets the
calulated token and unix groups.

Soon, it will also transform the result into an expanded struct
auth_session_info.  Until then, the variable name (server_info vs
session_info provides a clue to the developer about what information
has been entered in the structure).

By moving the calls to create_local_token within the codebase, we
remove duplication, and ensure that the session key (where modified)
is consistently copied into the new structure.

Andrew Bartlett
2011-04-05 06:32:07 +10:00
Volker Lendecke
6a9043d2f0 s3: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 12:50:53 CEST 2011 on sn-devel-104
2011-03-31 12:50:53 +02:00