diff --git a/plugins/sudoers/audit.c b/plugins/sudoers/audit.c index 5f07cd140..487ce189c 100644 --- a/plugins/sudoers/audit.c +++ b/plugins/sudoers/audit.c @@ -30,7 +30,9 @@ #include #include "sudoers.h" -#include "log_client.h" +#ifdef SUDOERS_LOG_CLIENT +# include "log_client.h" +#endif #ifdef HAVE_BSM_AUDIT # include "bsm_audit.h" diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 0ec4bcdf9..6a194bce5 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -42,7 +42,10 @@ #include "sudoers.h" #include "sudo_eventlog.h" #include "sudo_iolog.h" -#include "log_client.h" +#include "strlist.h" +#ifdef SUDOERS_LOG_CLIENT +# include "log_client.h" +#endif static struct iolog_file iolog_files[] = { { false }, /* IOFD_STDIN */ diff --git a/plugins/sudoers/log_client.c b/plugins/sudoers/log_client.c index 6d70a4dd1..d0ddaac92 100644 --- a/plugins/sudoers/log_client.c +++ b/plugins/sudoers/log_client.c @@ -62,6 +62,7 @@ #include "sudo_iolog.h" #include "hostcheck.h" #include "log_client.h" +#include "strlist.h" /* Shared between iolog.c and audit.c */ struct client_closure *client_closure; diff --git a/plugins/sudoers/log_client.h b/plugins/sudoers/log_client.h index b956bd382..70e320c12 100644 --- a/plugins/sudoers/log_client.h +++ b/plugins/sudoers/log_client.h @@ -25,7 +25,6 @@ #endif /* HAVE_OPENSSL */ #include "log_server.pb-c.h" -#include "strlist.h" #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error protobuf-c version 1.30 or higher required @@ -48,20 +47,6 @@ struct connection_buffer { }; TAILQ_HEAD(connection_buffer_list, connection_buffer); -struct log_details { - struct eventlog *evlog; - struct sudoers_str_list *log_servers; - struct timespec server_timeout; -#if defined(HAVE_OPENSSL) - char *ca_bundle; - char *cert_file; - char *key_file; -#endif /* HAVE_OPENSSL */ - bool keepalive; - bool verify_server; - bool ignore_log_errors; -}; - enum client_state { ERROR, RECV_HELLO, diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index 7d1a36241..39bee2246 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -54,7 +54,10 @@ #endif #include "sudoers.h" -#include "log_client.h" +#ifdef SUDOERS_LOG_CLIENT +# include "log_client.h" +# include "strlist.h" +#endif static bool should_mail(int); static bool warned = false; diff --git a/plugins/sudoers/logging.h b/plugins/sudoers/logging.h index 7c6fa8731..aa1b217de 100644 --- a/plugins/sudoers/logging.h +++ b/plugins/sudoers/logging.h @@ -22,6 +22,21 @@ #include +struct sudoers_str_list; +struct log_details { + struct eventlog *evlog; + struct sudoers_str_list *log_servers; + struct timespec server_timeout; +# if defined(HAVE_OPENSSL) + char *ca_bundle; + char *cert_file; + char *key_file; +# endif /* HAVE_OPENSSL */ + bool keepalive; + bool verify_server; + bool ignore_log_errors; +}; + /* * Values for sudoers_setlocale() */