summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-03-15 22:42:32 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-19 14:19:07 +0000
commit2c1047310970d3074f15fd20c8ccd58ba916a52f (patch)
tree3b64ea6ebdfaaa712829cf29d70b901bb496bb15 /meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
parentac4ff568f5b2ad4f50a1b7b60797e7b797c314bb (diff)
downloadpoky-2c1047310970d3074f15fd20c8ccd58ba916a52f.tar.gz
Upgrade to systemd 211+
Fixes [YOCTO #5940] Fix checks for %ms format to be a link time check runtime checks wont work in cross compiling Add a patch to workaround missing _SC_PHYS_PAGES in uclibc (From OE-Core rev: 0f5256d4ae5ed88c62e737e3c31587d7635b5dd6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch348
1 files changed, 0 insertions, 348 deletions
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
deleted file mode 100644
index e8a9144d86..0000000000
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
+++ /dev/null
@@ -1,348 +0,0 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: systemd-208/src/fsck/fsck.c
5===================================================================
6--- systemd-208.orig/src/fsck/fsck.c 2013-08-13 13:02:46.000000000 -0700
7+++ systemd-208/src/fsck/fsck.c 2013-11-05 22:01:26.776490078 -0800
8@@ -37,6 +37,8 @@
9 #include "virt.h"
10 #include "fileio.h"
11
12+#include "config.h"
13+
14 static bool arg_skip = false;
15 static bool arg_force = false;
16 static bool arg_show_progress = false;
17@@ -198,9 +200,16 @@
18 char *device;
19 double p;
20 usec_t t;
21-
22+#ifdef HAVE_MSFORMAT
23 if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
24- break;
25+#else
26+ device = malloc(257);
27+ if (fscanf(f, "%i %lu %lu %256s", &pass, &cur, &max, device) != 4) {
28+ free(device);
29+ }
30+
31+#endif /* HAVE_MSFORMAT */
32+ break;
33
34 /* Only show one progress counter at max */
35 if (!locked) {
36Index: systemd-208/src/core/swap.c
37===================================================================
38--- systemd-208.orig/src/core/swap.c 2013-09-26 11:20:30.000000000 -0700
39+++ systemd-208/src/core/swap.c 2013-11-05 22:01:26.776490078 -0800
40@@ -41,6 +41,8 @@
41 #include "path-util.h"
42 #include "virt.h"
43
44+#include "config.h"
45+
46 static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
47 [SWAP_DEAD] = UNIT_INACTIVE,
48 [SWAP_ACTIVATING] = UNIT_ACTIVATING,
49@@ -1041,6 +1043,7 @@
50 _cleanup_free_ char *dev = NULL, *d = NULL;
51 int prio = 0, k;
52
53+#ifdef HAVE_MSFORMAT
54 k = fscanf(m->proc_swaps,
55 "%ms " /* device/file */
56 "%*s " /* type of swap */
57@@ -1048,6 +1051,16 @@
58 "%*s " /* used */
59 "%i\n", /* priority */
60 &dev, &prio);
61+#else
62+ dev = malloc(257);
63+ k = fscanf(m->proc_swaps,
64+ "%256s "/* device/file */
65+ "%*s " /* type of swap */
66+ "%*s " /* swap size */
67+ "%*s " /* used */
68+ "%i\n", /* priority */
69+ dev, &prio);
70+#endif /* HAVE_MSFORMAT */
71 if (k != 2) {
72 if (k == EOF)
73 break;
74Index: systemd-208/src/core/mount-setup.c
75===================================================================
76--- systemd-208.orig/src/core/mount-setup.c 2013-08-13 13:02:46.000000000 -0700
77+++ systemd-208/src/core/mount-setup.c 2013-11-05 22:01:26.776490078 -0800
78@@ -28,6 +28,7 @@
79 #include <assert.h>
80 #include <unistd.h>
81 #include <ftw.h>
82+#include <linux/fs.h>
83
84 #include "mount-setup.h"
85 #include "dev-setup.h"
86@@ -43,6 +44,8 @@
87 #include "virt.h"
88 #include "efivars.h"
89
90+#include "config.h"
91+
92 #ifndef TTY_GID
93 #define TTY_GID 5
94 #endif
95@@ -233,9 +236,12 @@
96 for (;;) {
97 char *controller;
98 int enabled = 0;
99-
100+#ifdef HAVE_MSFORMAT
101 if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
102-
103+#else
104+ controller = malloc(257);
105+ if (fscanf(f, "%256s %*i %*i %i", controller, &enabled) != 2) {
106+#endif /* HAVE_MSFORMAT */
107 if (feof(f))
108 break;
109
110Index: systemd-208/src/core/mount.c
111===================================================================
112--- systemd-208.orig/src/core/mount.c 2013-09-26 11:20:30.000000000 -0700
113+++ systemd-208/src/core/mount.c 2013-11-05 22:07:43.784497482 -0800
114@@ -43,6 +43,8 @@
115 #include "exit-status.h"
116 #include "def.h"
117
118+#include "config.h"
119+
120 static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
121 [MOUNT_DEAD] = UNIT_INACTIVE,
122 [MOUNT_MOUNTING] = UNIT_ACTIVATING,
123@@ -1559,6 +1561,7 @@
124 _cleanup_free_ char *device = NULL, *path = NULL, *options = NULL, *options2 = NULL, *fstype = NULL, *d = NULL, *p = NULL, *o = NULL;
125 int k;
126
127+#ifdef HAVE_MSFORMAT
128 k = fscanf(m->proc_self_mountinfo,
129 "%*s " /* (1) mount id */
130 "%*s " /* (2) parent id */
131@@ -1577,7 +1580,31 @@
132 &fstype,
133 &device,
134 &options2);
135-
136+#else
137+ path = malloc(257);
138+ options = malloc(257);
139+ fstype = malloc(257);
140+ device = malloc(257);
141+ options2 = malloc(257);
142+ k = fscanf(m->proc_self_mountinfo,
143+ "%*s " /* (1) mount id */
144+ "%*s " /* (2) parent id */
145+ "%*s " /* (3) major:minor */
146+ "%*s " /* (4) root */
147+ "%256s " /* (5) mount point */
148+ "%256s" /* (6) mount options */
149+ "%*[^-]" /* (7) optional fields */
150+ "- " /* (8) separator */
151+ "%256s " /* (9) file system type */
152+ "%256s" /* (10) mount source */
153+ "%256s" /* (11) mount options 2 */
154+ "%*[^\n]", /* some rubbish at the end */
155+ path,
156+ options,
157+ fstype,
158+ device,
159+ options2);
160+#endif /* HAVE_MSFORMAT */
161 if (k == EOF)
162 break;
163
164Index: systemd-208/src/core/umount.c
165===================================================================
166--- systemd-208.orig/src/core/umount.c 2013-08-13 13:02:46.000000000 -0700
167+++ systemd-208/src/core/umount.c 2013-11-05 22:01:26.776490078 -0800
168@@ -36,6 +36,8 @@
169 #include "util.h"
170 #include "virt.h"
171
172+#include "config.h"
173+
174 typedef struct MountPoint {
175 char *path;
176 dev_t devnum;
177@@ -75,7 +77,7 @@
178 MountPoint *m;
179
180 path = p = NULL;
181-
182+#ifdef HAVE_MSFORMAT
183 if ((k = fscanf(proc_self_mountinfo,
184 "%*s " /* (1) mount id */
185 "%*s " /* (2) parent id */
186@@ -90,6 +92,23 @@
187 "%*s" /* (11) mount options 2 */
188 "%*[^\n]", /* some rubbish at the end */
189 &path)) != 1) {
190+#else
191+ path = malloc(257);
192+ if ((k = fscanf(proc_self_mountinfo,
193+ "%*s " /* (1) mount id */
194+ "%*s " /* (2) parent id */
195+ "%*s " /* (3) major:minor */
196+ "%*s " /* (4) root */
197+ "%256s " /* (5) mount point */
198+ "%*s" /* (6) mount options */
199+ "%*[^-]" /* (7) optional fields */
200+ "- " /* (8) separator */
201+ "%*s " /* (9) file system type */
202+ "%*s" /* (10) mount source */
203+ "%*s" /* (11) mount options 2 */
204+ "%*[^\n]", /* some rubbish at the end */
205+ path)) != 1) {
206+#endif /* HAVE_MSFORMAT */
207 if (k == EOF)
208 break;
209
210@@ -151,7 +170,7 @@
211 MountPoint *swap;
212 char *dev = NULL, *d;
213 int k;
214-
215+#ifdef HAVE_MSFORMAT
216 if ((k = fscanf(proc_swaps,
217 "%ms " /* device/file */
218 "%*s " /* type of swap */
219@@ -159,7 +178,16 @@
220 "%*s " /* used */
221 "%*s\n", /* priority */
222 &dev)) != 1) {
223-
224+#else
225+ dev = malloc(257);
226+ if ((k = fscanf(proc_swaps,
227+ "%256s " /* device/file */
228+ "%*s " /* type of swap */
229+ "%*s " /* swap size */
230+ "%*s " /* used */
231+ "%*s\n", /* priority */
232+ dev)) != 1) {
233+#endif /* HAVE_MSFORMAT */
234 if (k == EOF)
235 break;
236
237Index: systemd-208/src/shared/socket-util.c
238===================================================================
239--- systemd-208.orig/src/shared/socket-util.c 2013-09-26 11:20:30.000000000 -0700
240+++ systemd-208/src/shared/socket-util.c 2013-11-05 22:01:26.776490078 -0800
241@@ -40,6 +40,8 @@
242 #include "missing.h"
243 #include "fileio.h"
244
245+#include "config.h"
246+
247 int socket_address_parse(SocketAddress *a, const char *s) {
248 int r;
249 char *e, *n;
250@@ -203,8 +205,16 @@
251 a->type = SOCK_RAW;
252
253 errno = 0;
254+#ifdef HAVE_MSFORMAT
255 if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
256- return errno > 0 ? -errno : -EINVAL;
257+ return errno ? -errno : -EINVAL;
258+#else
259+ sfamily = malloc(257);
260+ if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
261+ free(sfamily);
262+ return errno ? -errno : -EINVAL;
263+ }
264+#endif /* HAVE_MSFORMAT */
265
266 family = netlink_family_from_string(sfamily);
267 if (family < 0)
268Index: systemd-208/src/tmpfiles/tmpfiles.c
269===================================================================
270--- systemd-208.orig/src/tmpfiles/tmpfiles.c 2013-09-17 14:55:37.000000000 -0700
271+++ systemd-208/src/tmpfiles/tmpfiles.c 2013-11-05 22:01:26.776490078 -0800
272@@ -53,6 +53,8 @@
273 #include "capability.h"
274 #include "specifier.h"
275
276+#include "config.h"
277+
278 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
279 * them in the file system. This is intended to be used to create
280 * properly owned directories beneath /tmp, /var/tmp, /run, which are
281@@ -1082,6 +1084,7 @@
282 assert(line >= 1);
283 assert(buffer);
284
285+#ifdef HAVE_MSFORMAT
286 r = sscanf(buffer,
287 "%c %ms %ms %ms %ms %ms %n",
288 &type,
289@@ -1091,6 +1094,29 @@
290 &group,
291 &age,
292 &n);
293+#else
294+ i->path = malloc(257);
295+ mode = malloc(257);
296+ user = malloc(257);
297+ group = malloc(257);
298+ age = malloc(257);
299+ r = sscanf(buffer,
300+ "%c "
301+ "%256s "
302+ "%256s "
303+ "%256s "
304+ "%256s "
305+ "%256s "
306+ "%n",
307+ &type,
308+ i->path,
309+ mode,
310+ user,
311+ group,
312+ age,
313+ &n);
314+#endif /* HAVE_MSFORMAT */
315+
316 if (r < 2) {
317 log_error("[%s:%u] Syntax error.", fname, line);
318 return -EIO;
319Index: systemd-208/src/cryptsetup/cryptsetup-generator.c
320===================================================================
321--- systemd-208.orig/src/cryptsetup/cryptsetup-generator.c 2013-09-30 09:57:04.000000000 -0700
322+++ systemd-208/src/cryptsetup/cryptsetup-generator.c 2013-11-05 22:01:26.776490078 -0800
323@@ -31,6 +31,8 @@
324 #include "strv.h"
325 #include "fileio.h"
326
327+#include "config.h"
328+
329 static const char *arg_dest = "/tmp";
330 static bool arg_enabled = true;
331 static bool arg_read_crypttab = true;
332@@ -420,7 +422,16 @@
333 if (*l == '#' || *l == 0)
334 continue;
335
336+#ifdef HAVE_MSFORMAT
337 k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options);
338+#else
339+ name = malloc(257);
340+ device = malloc(257);
341+ password = malloc(257);
342+ options = malloc(257);
343+ k = sscanf(l, "%256s %256s %256s %256s", name, device, password, options);
344+#endif /* HAVE_MSFORMAT */
345+
346 if (k < 2 || k > 4) {
347 log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
348 r = EXIT_FAILURE;