summaryrefslogtreecommitdiff
path: root/source3/rpc_server/lsasd.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-21s3-rpc_server: Refactor lsasd_create_sockets().Andreas Schneider1-33/+5
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Oct 21 12:49:44 CEST 2013 on sn-devel-104
2013-10-21lsasd: Fix CID 1107233 Double closeVolker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-03-15s3-lsad: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-05s3-daemons: Set the comment field of the daemons.Andreas Schneider1-0/+6
PR_SET_NAME sets the comm field of a process. This way we can give processes a name and they are easier to identify. $ ps afx -o pid,comm 29447 smbd 29452 \_ epmd 29453 \_ lsasd-master 29455 | \_ lsasd-child 29457 | \_ lsasd-child 29459 | \_ lsasd-child 29461 | \_ lsasd-child 29463 | \_ lsasd-child 29454 \_ spoolssd-master 29456 \_ lpqd 29458 \_ spoolssd-child 29460 \_ spoolssd-child 29462 \_ spoolssd-child 29465 \_ spoolssd-child 29466 \_ spoolssd-child 29467 \_ spoolssd-child 29468 \_ spoolssd-child 29469 \_ spoolssd-child 29470 \_ spoolssd-child 29471 \_ spoolssd-child Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-02-22s3-lsasd: Don't leak file descriptors.Andreas Schneider1-11/+18
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2012-10-19s3: Remove some calls to procid_selfVolker Lendecke1-5/+7
The goal is to have procid_self handling completely in the messaging_context. Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Oct 19 20:39:56 CEST 2012 on sn-devel-104
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-3/+3
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19s3:rpc_server/lsasd: remove dependency to libgen.h and basename()Stefan Metzmacher1-8/+11
metze
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij1-1/+1
The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-05s3-lsasd: Fix debug messages on registration failureAndrew Bartlett1-3/+3
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Mar 5 09:50:17 CET 2012 on sn-devel-104
2012-03-04change low FDs are handled in SambaAndrew Bartlett1-3/+0
We now only close fds 0, 1, 2 when we are a forked daemon, and take care not to close a file descriptor that we might need for foreground stdin monitoring. This should fix stdout logging in the lsa and epmapper deamons (ie in make test). Andrew Bartlett
2011-12-12s3: Remove a bunch of calls to procid_self()Volker Lendecke1-2/+2
All callers to messaging_[re]init only used procid_self()
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-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-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-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-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>