]> err.no Git - systemd/commitdiff
journal: when sending journal data via file, place it in /dev/shm, to allow early...
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jan 2012 14:40:58 +0000 (15:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Jan 2012 14:40:58 +0000 (15:40 +0100)
src/journal/journal-send.c

index 03bd17072830c3000911d8adb8fa10b1eadc0b04..00029fe0b361d10ebbf714f875ca1aa32ccfe96b 100644 (file)
@@ -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;