summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-18 15:40:58 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-18 15:40:58 +0100
commit9058851be7821edac08c1fa7ecafe5cba9ab9022 (patch)
tree6f88d34dd12e2b3806ee5a81cfb430c7436d5124
parent8d53b4534a5923721b5f1e9dd7e8f4a903d02d51 (diff)
journal: when sending journal data via file, place it in /dev/shm, to allow early boot operation, even if it sucks
-rw-r--r--src/journal/journal-send.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index 03bd170728..00029fe0b3 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
@@ -140,13 +140,16 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
int i, j = 0;
struct msghdr mh;
struct sockaddr_un sa;
- char path[] = "/tmp/journal.XXXXXX";
ssize_t k;
union {
struct cmsghdr cmsghdr;
uint8_t buf[CMSG_SPACE(sizeof(int))];
} control;
struct cmsghdr *cmsg;
+ /* We use /dev/shm instead of /tmp here, since we want this to
+ * be a tmpfs, and one that is available from early boot on
+ * and where unprivileged users can create files. */
+ char path[] = "/dev/shm/journal.XXXXXX";
if (!iov || n <= 0)
return -EINVAL;