commit 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 Author: Lennart Poettering Date: Wed Mar 21 23:47:44 2012 +0100 journal: PAGE_SIZE is not known on ppc and other archs Let's use NAME_MAX, as suggested by Dan Walsh Index: b/src/journal/journald.c =================================================================== --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -2141,10 +2140,20 @@ size_t label_len = 0; union { struct cmsghdr cmsghdr; + + /* We use NAME_MAX space for the + * SELinux label here. The kernel + * currently enforces no limit, but + * according to suggestions from the + * SELinux people this will change and + * it will probably be identical to + * NAME_MAX. For now we use that, but + * this should be updated one day when + * the final limit is known.*/ uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(struct timeval)) + - CMSG_SPACE(sizeof(int)) + - CMSG_SPACE(PAGE_SIZE)]; /* selinux label */ + CMSG_SPACE(sizeof(int)) + /* fd */ + CMSG_SPACE(NAME_MAX)]; /* selinux label */ } control; ssize_t n; int v;