X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournald-server.h;h=9c7fa50a96e8976f484f03d7c75c8be1660f1b89;hp=2c3e2c239dc13c5009a20bf869c8d3b4dd62607a;hb=ae6c3cc009a21df4b51851fb8fe3fde0b7d6d8f0;hpb=f9a810bedacf1da7c505c1786a2416d592665926 diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h index 2c3e2c239..9c7fa50a9 100644 --- a/src/journal/journald-server.h +++ b/src/journal/journald-server.h @@ -45,8 +45,8 @@ typedef enum Storage { } Storage; typedef enum SplitMode { - SPLIT_LOGIN, SPLIT_UID, + SPLIT_LOGIN, SPLIT_NONE, _SPLIT_MAX, _SPLIT_INVALID = -1 @@ -59,6 +59,8 @@ typedef struct Server { int native_fd; int stdout_fd; int dev_kmsg_fd; + int audit_fd; + int hostname_fd; sd_event *event; @@ -66,15 +68,17 @@ typedef struct Server { sd_event_source *native_event_source; sd_event_source *stdout_event_source; sd_event_source *dev_kmsg_event_source; + sd_event_source *audit_event_source; sd_event_source *sync_event_source; sd_event_source *sigusr1_event_source; sd_event_source *sigusr2_event_source; sd_event_source *sigterm_event_source; sd_event_source *sigint_event_source; + sd_event_source *hostname_event_source; JournalFile *runtime_journal; JournalFile *system_journal; - Hashmap *user_journals; + OrderedHashmap *user_journals; uint64_t seqnum; @@ -95,6 +99,7 @@ typedef struct Server { bool forward_to_kmsg; bool forward_to_syslog; bool forward_to_console; + bool forward_to_wall; unsigned n_forward_syslog_missed; usec_t last_warn_forward_syslog_missed; @@ -117,6 +122,7 @@ typedef struct Server { int max_level_syslog; int max_level_kmsg; int max_level_console; + int max_level_wall; Storage storage; SplitMode split_mode; @@ -130,6 +136,13 @@ typedef struct Server { struct udev *udev; bool sync_scheduled; + + char machine_id_field[sizeof("_MACHINE_ID=") + 32]; + char boot_id_field[sizeof("_BOOT_ID=") + 32]; + char *hostname_field; + + /* Cached cgroup root, so that we don't have to query that all the time */ + char *cgroup_root; } Server; #define N_IOVEC_META_FIELDS 20 @@ -137,7 +150,7 @@ typedef struct Server { #define N_IOVEC_UDEV_FIELDS 32 #define N_IOVEC_OBJECT_FIELDS 11 -void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigned m, struct ucred *ucred, struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid); +void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigned m, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid); void server_driver_message(Server *s, sd_id128_t message_id, const char *format, ...) _printf_(3,4); /* gperf lookup function */