On Wed, Feb 03, 2016 at 03:17:27PM -0800, Karol Mroz wrote: [...] > From a quick glance, removing changed.count("log_file"...) from > LogObs::handle_conf_changes() would skip over the early logfile creation in this observer. > A more invasive option would be to remove conf->apply_changes() from global_pre_init(), > thus delaying running the observers for the first time until after the permissions drop. > However, I suspect there may be valid reason why conf->apply_changes() is needed in > global_pre_init()? As I'm not familiar with the nuances here, a comment from someone more > familiar with this would be appreciated. Removing the changed.count("log_file") section in LogObs::handle_conf_changes() I think would kill the possibility of changing the logfile via injectargs. I'd say that's a no-go. The more I look at it, the more I think running conf->handle_changes(NULL) from global_pre_init() is not needed. Upon returning to global_init(), we invoke g_conf->call_all_observers() which does meta variable expansion and runs _all_ observers. This should be enough... or am I oversimplifying things? :D -- Regards, Karol
Attachment:
signature.asc
Description: Digital signature