1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source4
Gary Lockyer 099df25f56 source4 smbd: remove global control pipe from process_standard.
The standard model uses a pipe to signal the worker processes spawned on
accept that the controlling process has terminated and that they should
shut down.  This pipe is currently a static global variable in
process_standard.c.

This patch replaces that global pipe with a file descriptor passed into
the process model init functions, giving  a single mechanism across all process
models.  This paves the way for the addition of a pre-fork process model.

Ensuring that the correct file descriptors are closed, is difficult so
it is best do this only once rather than require the process models to
do this individually.

Notes on debugging pipe ownership:

Add code to log the process id and the file descriptor of the writeable
pipe.

run:
   lsof | grep FIFO | grep samba | grep <process id>
   this will produce lines like:

   samba 25624 him 4w FIFO 0,10 0t0 472206 pipe

   where: 4w is the file descriptor and mode and the number to the left
          of "pipe" is the pipe id.
then:
   lsof | grep FIFO | grep samba | grep <pipe id>

   This will display all the processes with the pipe open and the mode
   only the smbd master process should have it open in write mode.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Sep 28 02:08:34 CEST 2017 on sn-devel-144
2017-09-28 02:08:34 +02:00
..
auth s4:auth/ntlmssp: add support for using "winbind" as DC 2017-08-07 15:20:03 +02:00
build/pasn1
cldap_server s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
client s4: cifsdd: Allocate the event context off NULL, not talloc_autofree_context(). 2017-05-13 16:50:13 +02:00
cluster Remove callers of lp_use_ntdb 2015-03-17 11:30:51 +01:00
dns_server samdb: Rework samdb_connect_url() to return LDB error code and an error string 2017-09-20 02:25:30 +02:00
dsdb replmd: RMD_VERSION incorrectly incremented for link conflicts 2017-09-26 09:36:48 +02:00
echo_server s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
heimdal HEIMDAL: don't bother seeing q if not sent 2017-08-28 15:10:54 +02:00
heimdal_build strerror_r: provide XSI-compliant strerror_r 2017-06-13 18:38:14 +02:00
include lib: Remove global xfile.h includes 2016-11-20 06:23:19 +01:00
kdc mit-kdb: Fix NULL pointer check after malloc 2017-07-24 18:45:33 +02:00
ldap_server ldap_server: Plumb ldb error string from a failed connect to ldapsrv_terminate_connection() 2017-09-20 02:25:30 +02:00
lib lib: talloc: Use the system <talloc.h> include. 2017-08-17 00:53:48 +02:00
libcli Make sure smbtorture tests can run if someone has set their min protocol above NT1. 2017-09-20 22:48:15 +02:00
libnet debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00
librpc Install dcerpc/__init__.py for all Python environments 2017-09-14 22:29:39 +02:00
nbt_server s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
ntp_signd s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
ntvfs s4:auth/unix_token: remove unused tevent_context from security_token_to_unix_token() 2017-06-26 08:47:15 +02:00
param source4/provision: fix talloc_steal on unallocated memory 2017-05-25 02:25:13 +02:00
rpc_server s4-dnsserver: Check for too many DNS results 2017-09-20 08:15:21 +02:00
script find_unused_macros: Remove obsolete script that finds unused macros. 2014-08-31 21:21:13 +02:00
scripting scripting: Add script (backportable) to undo a GUID index 2017-09-23 09:16:31 +02:00
selftest selftest: Rename ntlmauth tests to ntlmdisabled 2017-09-26 00:41:16 +02:00
setup provision: Add a fixed GUID to the samba4top objectclass definition 2017-09-23 05:26:15 +02:00
smb_server s4:smb_server: avoid using gensec_update_ev() for the negotiate blob 2017-05-21 21:05:08 +02:00
smbd source4 smbd: remove global control pipe from process_standard. 2017-09-28 02:08:34 +02:00
torture selftest: Add test for a re-animated object conflict 2017-09-26 05:33:17 +02:00
utils man pages: change http://samba.org to https://www.samba.org 2016-12-09 13:10:26 +01:00
web_server s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
winbind s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
wrepl_server s4: Add TALLOC_CTX * to register_server_service(). 2017-05-11 20:30:13 +02:00
.clang_complete
.valgrind_suppressions
wscript_build Do not install smbclient4 and nmblookup4 2014-04-15 03:25:13 +02:00