summaryrefslogtreecommitdiff
path: root/source3/rpc_server
AgeCommit message (Collapse)AuthorFilesLines
2011-08-31s3-rpc_server: Disable epmapper by default.Andreas Schneider1-2/+2
We need more testing in the real world. We need to be sure that if a Windows client can access port 135 it doesn't require that a service is available via ncacn_ip_tcp. If possible please enable it using the following smb.conf options for testing: rpc_daemon:epmd = fork rpc_server:epmapper = external Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Wed Aug 31 16:29:20 CEST 2011 on sn-devel-104
2011-08-31s3-lsa: Add _lsa_SetInformationTrustedDomain() and related callsSumit Bose1-21/+312
The following LSA calls are added: - _lsa_SetInformationTrustedDomain() - _lsa_SetTrustedDomainInfo() -_lsa_SetTrustedDomainInfoByName() Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31s3-lsa: Update _lsa_QueryTrustedDomainInfo()Sumit Bose1-8/+63
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31s3-lsa: Fix access mapping in_lsa_OpenTrustedDomain_base()Sumit Bose1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31s3-lsa: Fix typo and use right pdb interfaceSumit Bose1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-30s3-rpc_server: Make sure we switch always the connecting user.Andreas Schneider1-13/+11
We always have a valid session info and if it is a anonymous connection we have a session info of the guest user. This means we should always call become_authenticated_pipe_user() else and anonymous user could do things as root. Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Tue Aug 30 20:50:54 CEST 2011 on sn-devel-104
2011-08-29s3:rpc_server: fix two debug messages in svcctl_add_service()Michael Adam1-2/+2
(copy and paste from eventlog?) Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Aug 29 15:30:33 CEST 2011 on sn-devel-104
2011-08-29s3-lib: If we create a pipe socket, don't start to listen.Andreas Schneider1-0/+16
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-24s3: Fix an uninitialized variableVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Aug 24 00:34:04 CEST 2011 on sn-devel-104
2011-08-23s3: Fix the build on FreeBSDVolker Lendecke1-0/+1
lsasd.c uses basename(3), which according to susv3 requires libgen.h and without which the FreeBSD build breaks.
2011-08-21s3-passdb: Keep caches coherentAndreas Schneider1-0/+3
When deleting a user send a message to all interested parties so they can purge their caches. Otherwise some processes may positively respond with a cached getpwnam, when the user have actully been removed. Without this some tests that remove and then immediately create users are flakey. Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Listen on \PIPE\lsass.Andreas Schneider1-0/+16
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Add missing ncalrpc listeners.Andreas Schneider1-0/+66
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Add create_dcerpc_ncalrpc_socket().Andreas Schneider2-12/+29
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Increase epm monitor wait time.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Remove useless checkSimo Sorce1-16/+3
If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not be honoured for a long time if we have cients connected, therefore keep handling SIGHUP properly in those cases. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Listen on parent messagesSimo Sorce1-0/+18
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Send a message to the parent when we accept a connectionSimo Sorce1-0/+25
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: User new prefork helpers to simplify code.Simo Sorce1-27/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: Fix worker flags handling.Simo Sorce1-1/+1
We can't have a clear idea of wether the worker is IDLE or BUSY. The only things we can tell is if it is Alive, whether it is currently Accepting connections or wether it is Exiting soon. Remove PF_WORKER_IDLE, PF_WORKER_BUSY and replace their use with PF_WORKER_ALIVE. Also properly assign PF_WORKER_ACCEPTING so that users of the API can rely on the flag. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-prefork: do not use a lock_fd, just race on accept()Simo Sorce1-18/+5
We used a lock mimicking what apache does for preforked children. But it doesn't work properly in our case because we do not stop once a request has been served. Clients are allowed to perform multiple requests and keep the connection open. This means that if we allow multiple clients per children, then a child could take the lock and then be asked to do a long or even locking operation by a client it already is serving. This woulkd cause the whole server to deadlock, as the child is now busy and also holding on the lock. Using a race on accept() by having a tevent_fd on the listening socket wait for read events we never deadlock. At most we cause a bit of contention among children. But in the generic case connections are much less frequent for us as clients tend to be long lived. So the little contention we may have is not a big deal. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21rpc_server: Add forward declaration for dcerpc_transport_t.Andreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-waf: Fix build with lsasd.Andreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Use prefrok utils to manage childrenSimo Sorce1-117/+36
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-winbind: We need to use internal rpc connections in winbind.Andreas Schneider2-1/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Import fixes from spoolssdSimo Sorce1-98/+36
Properly rotate log files in children by using a gloabl lsasd_child_id variable. Simplify code by using a global lsasd_pool variable, we can never use more than one prefork pool in the same process anyway. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Use rpc_service_mode() in np_open()Simo Sorce1-19/+19
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Use rpc_service_mode() in rpc_pipe_open_interface()Simo Sorce1-10/+11
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Replace RPC_SERVICE_MODE_DAEMON checksSimo Sorce3-10/+16
Use rpc_daemon_type() macros where appropriate instead. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Move config helpers in one place.Simo Sorce7-138/+193
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Add helper to define/retrieve daemons configurationSimo Sorce2-0/+65
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-21s3-rpc_server: Reduce code duplicationSimo Sorce2-105/+38
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Correctly register lsa, samr and netlogon.Andreas Schneider2-3/+82
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-lsasd: Create a lsa service daemon.Andreas Schneider1-0/+1034
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Make dcerpc_ncacn_accept() public.Andreas Schneider2-17/+17
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Check explicit for external and daemon server type.Andreas Schneider1-1/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21s3-rpc_server: Fix include order in srv_pipe_hnd.c.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-11s3-messaging: Do not register to classes we are not going to use.Simo Sorce1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Aug 11 17:09:30 CEST 2011 on sn-devel-104
2011-08-11s3-messaging: Remove obsolete class.Simo Sorce1-13/+0
The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the only message belonging to it is not used either. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-rpc_server: add termination functionSimo Sorce2-3/+23
This way we can act when a client disconnects. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-10s3-rpc: Expose some internal functionsSimo Sorce2-33/+44
This will allow to hook the prefork socket handlers to the rpc service. Signed-off-by: Andreas Schneider <asn@samba.org>
2011-08-09s3-rpc_server: Fix sending of packets over named pipe proxy.Andreas Schneider1-22/+27
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-09s3-rpc_server: Free the children of p->mem_ctx.Andreas Schneider1-1/+5
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-03s3-auth rename auth_ntlmssp_steal_session_info()Andrew Bartlett1-1/+1
There is no longer any theft of memory as the underlying routines now produce a new auth_session_info for this caller, allocating it on the supplied memory context. Andrew Bartlett
2011-08-03s3-auth set session_info->sanitized_username in create_local_token()Andrew Bartlett1-1/+2
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-03s3-ntlmssp Split auth_ntlmssp_start into two functionsAndrew Bartlett1-2/+9
This helps map on to the GENSEC semantics better, and ensures that the full set of desired features are set before the mechanism starts. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Remove calls to auth_ntlmssp_and_flags from the serverAndrew Bartlett1-7/+2
This is changed so that the callers ask for the additional flags that they need, starting with no additional flags. This helps to create a proper abstraction layer in ntlmssp_wrap/auth_ntlmssp. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_updateAndrew Bartlett1-7/+2
This clarifies the lifetime of the returned token. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-rpc_server use session_info to print user detailsAndrew Bartlett1-4/+3
This is the authoritative source for what the user was actually authenticated as. The previous message printed only what they claimed, and the DC might map this. The workstation is no longer printed in the logs, as it allows auth_ntlmssp_get_client() to be removed. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-02s3:spoolss: make use of cli_state_protocol()Stefan Metzmacher1-1/+1
metze