1 |
mgorny 12/04/06 20:13:13 |
2 |
|
3 |
Added: |
4 |
0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch |
5 |
Log: |
6 |
Add a patch for ARM and keyword wrt bug #410973. |
7 |
|
8 |
(Portage version: 2.2.0_alpha99_p2/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-apps/systemd/files/0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: 0002-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch |
17 |
=================================================================== |
18 |
From 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 Mon Sep 17 00:00:00 2001 |
19 |
From: Lennart Poettering <lennart@××××××××××.net> |
20 |
Date: Wed, 21 Mar 2012 23:47:44 +0100 |
21 |
Subject: [PATCH] journal: PAGE_SIZE is not known on ppc and other archs |
22 |
|
23 |
Let's use NAME_MAX, as suggested by Dan Walsh |
24 |
--- |
25 |
src/journal/journald.c | 15 ++++++++++++--- |
26 |
1 file changed, 12 insertions(+), 3 deletions(-) |
27 |
|
28 |
diff --git a/src/journal/journald.c b/src/journal/journald.c |
29 |
index d27cb60..87390bd 100644 |
30 |
--- a/src/journal/journald.c |
31 |
+++ b/src/journal/journald.c |
32 |
@@ -29,7 +29,6 @@ |
33 |
#include <sys/ioctl.h> |
34 |
#include <linux/sockios.h> |
35 |
#include <sys/statvfs.h> |
36 |
-#include <sys/user.h> |
37 |
|
38 |
#include <systemd/sd-journal.h> |
39 |
#include <systemd/sd-login.h> |
40 |
@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) { |
41 |
size_t label_len = 0; |
42 |
union { |
43 |
struct cmsghdr cmsghdr; |
44 |
+ |
45 |
+ /* We use NAME_MAX space for the |
46 |
+ * SELinux label here. The kernel |
47 |
+ * currently enforces no limit, but |
48 |
+ * according to suggestions from the |
49 |
+ * SELinux people this will change and |
50 |
+ * it will probably be identical to |
51 |
+ * NAME_MAX. For now we use that, but |
52 |
+ * this should be updated one day when |
53 |
+ * the final limit is known.*/ |
54 |
uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) + |
55 |
CMSG_SPACE(sizeof(struct timeval)) + |
56 |
- CMSG_SPACE(sizeof(int)) + |
57 |
- CMSG_SPACE(PAGE_SIZE)]; /* selinux label */ |
58 |
+ CMSG_SPACE(sizeof(int)) + /* fd */ |
59 |
+ CMSG_SPACE(NAME_MAX)]; /* selinux label */ |
60 |
} control; |
61 |
ssize_t n; |
62 |
int v; |
63 |
-- |
64 |
1.7.9.4 |