Compare commits
2 Commits
5417a7439e
...
231fc8e451
Author | SHA1 | Date |
---|---|---|
Daan De Meyer | 231fc8e451 | |
Daan De Meyer | 44d1ad6d4f |
|
@ -17,6 +17,7 @@
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "audit-util.h"
|
#include "audit-util.h"
|
||||||
#include "cgroup-util.h"
|
#include "cgroup-util.h"
|
||||||
|
#include "chattr-util.h"
|
||||||
#include "conf-parser.h"
|
#include "conf-parser.h"
|
||||||
#include "creds-util.h"
|
#include "creds-util.h"
|
||||||
#include "dirent-util.h"
|
#include "dirent-util.h"
|
||||||
|
@ -366,8 +367,18 @@ static int server_system_journal_open(
|
||||||
*
|
*
|
||||||
* If in persistent mode: create /var/log/journal and the machine path */
|
* If in persistent mode: create /var/log/journal and the machine path */
|
||||||
|
|
||||||
if (s->storage == STORAGE_PERSISTENT)
|
if (s->storage == STORAGE_PERSISTENT) {
|
||||||
(void) mkdir_parents(s->system_storage.path, 0755);
|
_cleanup_free_ char *parent = NULL;
|
||||||
|
|
||||||
|
r = path_extract_directory(s->system_storage.path, &parent);
|
||||||
|
if (r < 0)
|
||||||
|
log_warning_errno(r, "Failed to extract parent directory from %s, ignoring: %m",
|
||||||
|
s->system_storage.path);
|
||||||
|
else {
|
||||||
|
(void) mkdir_p(parent, 0755);
|
||||||
|
(void) chattr_path(parent, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
(void) mkdir(s->system_storage.path, 0755);
|
(void) mkdir(s->system_storage.path, 0755);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue