chiark / gitweb /
journald: allocate PAGE_SIZE bytes for selinux label length
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Mar 2012 02:39:15 +0000 (03:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Mar 2012 02:39:15 +0000 (03:39 +0100)
As suggested in https://bugzilla.redhat.com/show_bug.cgi?id=798760

src/journal/journald.c

index e9c00b443cff7decd1cf62df2b6e8fc82314337f..ad7c655ff4e17678906ede9d29ba77c98b1ec2f6 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/ioctl.h>
 #include <linux/sockios.h>
 #include <sys/statvfs.h>
+#include <sys/user.h>
 
 #include <systemd/sd-journal.h>
 #include <systemd/sd-login.h>
@@ -2133,7 +2134,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
                                 uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
                                             CMSG_SPACE(sizeof(struct timeval)) +
                                             CMSG_SPACE(sizeof(int)) +
-                                            CMSG_SPACE(LINE_MAX)]; /* selinux label */
+                                            CMSG_SPACE(PAGE_SIZE)]; /* selinux label */
                         } control;
                         ssize_t n;
                         int v;