@@ -1,12 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "sd-journal.h"
|
||||
|
||||
#include "env-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "fuzz.h"
|
||||
#include "journal-remote.h"
|
||||
@@ -14,7 +13,6 @@
|
||||
#include "memfd-util.h"
|
||||
#include "path-util.h"
|
||||
#include "rm-rf.h"
|
||||
#include "strv.h"
|
||||
#include "tests.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-compression-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
static int compression_config_put(OrderedHashmap **configs, Compression c, int level) {
|
||||
assert(configs);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "compress.h"
|
||||
#include "conf-parser.h"
|
||||
#include "hashmap.h"
|
||||
#include "conf-parser-forward.h"
|
||||
#include "forward.h"
|
||||
|
||||
typedef struct CompressionConfig {
|
||||
Compression algorithm;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
@@ -16,7 +15,6 @@
|
||||
#include "alloc-util.h"
|
||||
#include "build.h"
|
||||
#include "bus-locator.h"
|
||||
#include "bus-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
@@ -34,6 +32,7 @@
|
||||
#include "parse-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "signal-util.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "escape.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-header-util.h"
|
||||
#include "log.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "hashmap.h"
|
||||
#include "conf-parser-forward.h"
|
||||
#include "forward.h"
|
||||
|
||||
bool header_value_is_valid(const char *value);
|
||||
|
||||
|
||||
@@ -4,31 +4,33 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "build.h"
|
||||
#include "conf-parser.h"
|
||||
#include "constants.h"
|
||||
#include "daemon-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fileio.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-compression-util.h"
|
||||
#include "journal-remote.h"
|
||||
#include "journal-remote-write.h"
|
||||
#include "logs-show.h"
|
||||
#include "main-func.h"
|
||||
#include "memory-util.h"
|
||||
#include "microhttpd-util.h"
|
||||
#include "parse-argument.h"
|
||||
#include "parse-helpers.h"
|
||||
#include "parse-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "process-util.h"
|
||||
#include "rlimit-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "socket-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "journal-remote-parse.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
RemoteSource* source_free(RemoteSource *source) {
|
||||
if (!source)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "compress.h"
|
||||
#include "forward.h"
|
||||
#include "journal-importer.h"
|
||||
#include "journal-remote-write.h"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <libgen.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-file-util.h"
|
||||
#include "journal-remote.h"
|
||||
#include "journal-vacuum.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "stat-util.h"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "journal-file.h"
|
||||
#include "journal-importer.h"
|
||||
|
||||
typedef struct RemoteServer RemoteServer;
|
||||
|
||||
|
||||
@@ -1,31 +1,22 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
#include "constants.h"
|
||||
#include "errno-util.h"
|
||||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-file-util.h"
|
||||
#include "journal-remote.h"
|
||||
#include "journal-remote-write.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "parse-helpers.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
#include "socket-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#define REMOTE_JOURNAL_PATH "/var/log/journal/remote"
|
||||
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "forward.h"
|
||||
#include "journal-remote-parse.h"
|
||||
#include "journal-remote-write.h"
|
||||
#include "journal-vacuum.h"
|
||||
|
||||
struct RemoteServer {
|
||||
typedef struct RemoteServer {
|
||||
RemoteSource **sources;
|
||||
size_t active;
|
||||
|
||||
@@ -26,7 +23,7 @@ struct RemoteServer {
|
||||
JournalFileFlags file_flags;
|
||||
bool check_trust;
|
||||
JournalMetrics metrics;
|
||||
};
|
||||
} RemoteServer;
|
||||
extern RemoteServer *journal_remote_server_global;
|
||||
|
||||
/* Used for MHD_OPTION_CONNECTION_MEMORY_LIMIT and header parsing cap */
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-journal.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "journal-upload.h"
|
||||
#include "log.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "build.h"
|
||||
#include "conf-parser.h"
|
||||
#include "constants.h"
|
||||
#include "daemon-util.h"
|
||||
#include "env-file.h"
|
||||
#include "escape.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "journal-header-util.h"
|
||||
#include "journal-upload.h"
|
||||
#include "journal-util.h"
|
||||
@@ -31,10 +31,9 @@
|
||||
#include "parse-helpers.h"
|
||||
#include "pretty-print.h"
|
||||
#include "process-util.h"
|
||||
#include "rlimit-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
@@ -3,13 +3,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "sd-journal.h"
|
||||
|
||||
#include "forward.h"
|
||||
#include "journal-compression-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef enum {
|
||||
ENTRY_CURSOR = 0, /* Nothing actually written yet. */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_GNUTLS
|
||||
@@ -10,7 +9,6 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "microhttpd-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
#if HAVE_MICROHTTPD
|
||||
|
||||
#include <microhttpd.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "memory-util.h"
|
||||
#include "forward.h"
|
||||
|
||||
/* Those defines are added when options are renamed. If the old names
|
||||
* are not '#define'd, then they are not deprecated yet and there are
|
||||
|
||||
Reference in New Issue
Block a user