From 5a4d61810961af199859dfb52981632bfe594e95 Mon Sep 17 00:00:00 2001 From: Aravind Srinivasan Date: Tue, 16 Jun 2009 15:11:32 -0700 Subject: s3: forward MSG_DEBUG from smbd parent to all children Before 3.3, an smbcontrol debug message sent to the target "smbd" would actually be sent to all running processes including nmbd and winbindd. This behavior was changed in 3.3 so that the "smbd" target would only send a message to the process found in smbd.pid, while the "all" target would send a message to all processes. The ability to set the debug level of all processes within a single daemon, without specifying each pid is quite useful. This was implemented in winbindd in 065760ed. This patch does the same thing for smbd. Upon receiving a MSG_DEBUG the parent smbd will rebroadcast it to all of its children. The printing process has been added to the list of smbd child processes, and we now always track the number of smbd children regardless of the "max smbd processes" setting. --- source3/include/smb.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/include') diff --git a/source3/include/smb.h b/source3/include/smb.h index 4eed68faaf..87fd2b05cc 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1927,4 +1927,10 @@ struct smb_filename { SMB_STRUCT_STAT st; }; +/* struct for maintaining the child processes that get spawned from smbd */ +struct child_pid { + struct child_pid *prev, *next; + pid_t pid; +}; + #endif /* _SMB_H */ -- cgit