[PATCH] s3:notifyd: Handle sigup in notifyd to reparse smb.conf
Jeremy Allison
jra at samba.org
Fri May 24 00:04:05 UTC 2019
On Sun, May 19, 2019 at 02:46:29AM +0000, Shyam Rathi via samba-technical wrote:
> Hello,
>
> At present, SIGHUP is blocked on notifyd. So, if parent smbd
> is started with "log level" 10 in smb.conf, and later changed
> to 0, the SIGHUP will not change the log level to 0 in notify
> smbd process and it will keep printing verbose logs in the
> corresponding log files.
>
> Proposed fix is to write a SIGHUP handler for notifyd and set
> it to reload services.
>
>
> Please review the attached patch for suggestions and comments.
Hi Shyamsunder,
A few comments.
In notifyd_sig_hup_handler().
+ DEBUG(2,("notifyd: Reloading services after SIGHUP\n"));
^^^^
Please use either the DBG_WARNING or DBG_NOTICE macros
to ensure consistency in new debug info levels.
+ become_root();
+ reload_services(NULL, NULL, false);
+ unbecome_root();
^^^^^^^
Does notifyd need become_root()/unbecome_root()
pairs ? Isn't it always invoked when smbd is root
and stays as such ?
The rest of this looks fine ! Thanks a *lot*
for your help.
Jeremy.
More information about the samba-technical
mailing list