Only include log_client.h if SUDOERS_LOG_CLIENT is defined.

This commit is contained in:
Todd C. Miller
2021-10-21 19:46:35 -06:00
parent cf47187eb5
commit 00f0c233b2
6 changed files with 27 additions and 18 deletions

View File

@@ -30,7 +30,9 @@
#include <string.h>
#include "sudoers.h"
#ifdef SUDOERS_LOG_CLIENT
# include "log_client.h"
#endif
#ifdef HAVE_BSM_AUDIT
# include "bsm_audit.h"

View File

@@ -42,7 +42,10 @@
#include "sudoers.h"
#include "sudo_eventlog.h"
#include "sudo_iolog.h"
#include "strlist.h"
#ifdef SUDOERS_LOG_CLIENT
# include "log_client.h"
#endif
static struct iolog_file iolog_files[] = {
{ false }, /* IOFD_STDIN */

View File

@@ -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;

View File

@@ -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,

View File

@@ -54,7 +54,10 @@
#endif
#include "sudoers.h"
#ifdef SUDOERS_LOG_CLIENT
# include "log_client.h"
# include "strlist.h"
#endif
static bool should_mail(int);
static bool warned = false;

View File

@@ -22,6 +22,21 @@
#include <stdarg.h>
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()
*/