static gboolean systemd_syslog_sd_init_method(LogPipe *s) { SystemDSyslogSourceDriver *self = (SystemDSyslogSourceDriver*) s; if (service_management_get_type() != SMT_SYSTEMD) { msg_error("Error initializing systemd-syslog() source", evt_tag_str("systemd_status", "not-running"), NULL); return FALSE; } if (self->from_unix_source) { msg_warning("systemd-syslog() source ignores configuration options. " "Please, do not set anything on it", NULL); socket_options_free(self->super.socket_options); self->super.socket_options = socket_options_new(); socket_options_init_instance(self->super.socket_options); } return afsocket_sd_init_method((LogPipe*) &self->super); }
static gboolean afunix_sd_init(LogPipe *s) { AFUnixSourceDriver *self = (AFUnixSourceDriver *) s; return afsocket_sd_init_method(s) && afunix_sd_apply_perms_to_socket(self); }