diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-07-09 17:30:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-09 17:30:22 +0200 |
commit | 461b1822321d6be0d7fd8be29bf3b4993ebd1b85 (patch) | |
tree | 34c4d6423ed74c0f03ba206818827c86cec219a6 /src/journal | |
parent | 8401e9f91d65c3d8d49cf0d2e35d03146354e957 (diff) |
paranoia: refuse rm_rf("/")
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journald.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index 8d1b10d270..0629f79f1c 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -2058,7 +2058,6 @@ static int system_journal_open(Server *s) { } static int server_flush_to_var(Server *s) { - char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; Object *o = NULL; int r; sd_id128_t machine; @@ -2135,6 +2134,7 @@ finish: s->runtime_journal = NULL; if (r >= 0) { + char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; sd_id128_to_string(machine, path + 17); rm_rf(path, false, true, false); } |