aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
diff options
context:
space:
mode:
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 @@
-Upstream-Status: Denied [no desire for uclibc support]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: systemd-208/src/fsck/fsck.c
-===================================================================
---- systemd-208.orig/src/fsck/fsck.c 2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/fsck/fsck.c 2013-11-05 22:01:26.776490078 -0800
-@@ -37,6 +37,8 @@
- #include "virt.h"
- #include "fileio.h"
-
-+#include "config.h"
-+
- static bool arg_skip = false;
- static bool arg_force = false;
- static bool arg_show_progress = false;
-@@ -198,9 +200,16 @@
- char *device;
- double p;
- usec_t t;
--
-+#ifdef HAVE_MSFORMAT
- if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
-- break;
-+#else
-+ device = malloc(257);
-+ if (fscanf(f, "%i %lu %lu %256s", &pass, &cur, &max, device) != 4) {
-+ free(device);
-+ }
-+
-+#endif /* HAVE_MSFORMAT */
-+ break;
-
- /* Only show one progress counter at max */
- if (!locked) {
-Index: systemd-208/src/core/swap.c
-===================================================================
---- systemd-208.orig/src/core/swap.c 2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/core/swap.c 2013-11-05 22:01:26.776490078 -0800
-@@ -41,6 +41,8 @@
- #include "path-util.h"
- #include "virt.h"
-
-+#include "config.h"
-+
- static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
- [SWAP_DEAD] = UNIT_INACTIVE,
- [SWAP_ACTIVATING] = UNIT_ACTIVATING,
-@@ -1041,6 +1043,7 @@
- _cleanup_free_ char *dev = NULL, *d = NULL;
- int prio = 0, k;
-
-+#ifdef HAVE_MSFORMAT
- k = fscanf(m->proc_swaps,
- "%ms " /* device/file */
- "%*s " /* type of swap */
-@@ -1048,6 +1051,16 @@
- "%*s " /* used */
- "%i\n", /* priority */
- &dev, &prio);
-+#else
-+ dev = malloc(257);
-+ k = fscanf(m->proc_swaps,
-+ "%256s "/* device/file */
-+ "%*s " /* type of swap */
-+ "%*s " /* swap size */
-+ "%*s " /* used */
-+ "%i\n", /* priority */
-+ dev, &prio);
-+#endif /* HAVE_MSFORMAT */
- if (k != 2) {
- if (k == EOF)
- break;
-Index: systemd-208/src/core/mount-setup.c
-===================================================================
---- systemd-208.orig/src/core/mount-setup.c 2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/core/mount-setup.c 2013-11-05 22:01:26.776490078 -0800
-@@ -28,6 +28,7 @@
- #include <assert.h>
- #include <unistd.h>
- #include <ftw.h>
-+#include <linux/fs.h>
-
- #include "mount-setup.h"
- #include "dev-setup.h"
-@@ -43,6 +44,8 @@
- #include "virt.h"
- #include "efivars.h"
-
-+#include "config.h"
-+
- #ifndef TTY_GID
- #define TTY_GID 5
- #endif
-@@ -233,9 +236,12 @@
- for (;;) {
- char *controller;
- int enabled = 0;
--
-+#ifdef HAVE_MSFORMAT
- if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
--
-+#else
-+ controller = malloc(257);
-+ if (fscanf(f, "%256s %*i %*i %i", controller, &enabled) != 2) {
-+#endif /* HAVE_MSFORMAT */
- if (feof(f))
- break;
-
-Index: systemd-208/src/core/mount.c
-===================================================================
---- systemd-208.orig/src/core/mount.c 2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/core/mount.c 2013-11-05 22:07:43.784497482 -0800
-@@ -43,6 +43,8 @@
- #include "exit-status.h"
- #include "def.h"
-
-+#include "config.h"
-+
- static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
- [MOUNT_DEAD] = UNIT_INACTIVE,
- [MOUNT_MOUNTING] = UNIT_ACTIVATING,
-@@ -1559,6 +1561,7 @@
- _cleanup_free_ char *device = NULL, *path = NULL, *options = NULL, *options2 = NULL, *fstype = NULL, *d = NULL, *p = NULL, *o = NULL;
- int k;
-
-+#ifdef HAVE_MSFORMAT
- k = fscanf(m->proc_self_mountinfo,
- "%*s " /* (1) mount id */
- "%*s " /* (2) parent id */
-@@ -1577,7 +1580,31 @@
- &fstype,
- &device,
- &options2);
--
-+#else
-+ path = malloc(257);
-+ options = malloc(257);
-+ fstype = malloc(257);
-+ device = malloc(257);
-+ options2 = malloc(257);
-+ k = fscanf(m->proc_self_mountinfo,
-+ "%*s " /* (1) mount id */
-+ "%*s " /* (2) parent id */
-+ "%*s " /* (3) major:minor */
-+ "%*s " /* (4) root */
-+ "%256s " /* (5) mount point */
-+ "%256s" /* (6) mount options */
-+ "%*[^-]" /* (7) optional fields */
-+ "- " /* (8) separator */
-+ "%256s " /* (9) file system type */
-+ "%256s" /* (10) mount source */
-+ "%256s" /* (11) mount options 2 */
-+ "%*[^\n]", /* some rubbish at the end */
-+ path,
-+ options,
-+ fstype,
-+ device,
-+ options2);
-+#endif /* HAVE_MSFORMAT */
- if (k == EOF)
- break;
-
-Index: systemd-208/src/core/umount.c
-===================================================================
---- systemd-208.orig/src/core/umount.c 2013-08-13 13:02:46.000000000 -0700
-+++ systemd-208/src/core/umount.c 2013-11-05 22:01:26.776490078 -0800
-@@ -36,6 +36,8 @@
- #include "util.h"
- #include "virt.h"
-
-+#include "config.h"
-+
- typedef struct MountPoint {
- char *path;
- dev_t devnum;
-@@ -75,7 +77,7 @@
- MountPoint *m;
-
- path = p = NULL;
--
-+#ifdef HAVE_MSFORMAT
- if ((k = fscanf(proc_self_mountinfo,
- "%*s " /* (1) mount id */
- "%*s " /* (2) parent id */
-@@ -90,6 +92,23 @@
- "%*s" /* (11) mount options 2 */
- "%*[^\n]", /* some rubbish at the end */
- &path)) != 1) {
-+#else
-+ path = malloc(257);
-+ if ((k = fscanf(proc_self_mountinfo,
-+ "%*s " /* (1) mount id */
-+ "%*s " /* (2) parent id */
-+ "%*s " /* (3) major:minor */
-+ "%*s " /* (4) root */
-+ "%256s " /* (5) mount point */
-+ "%*s" /* (6) mount options */
-+ "%*[^-]" /* (7) optional fields */
-+ "- " /* (8) separator */
-+ "%*s " /* (9) file system type */
-+ "%*s" /* (10) mount source */
-+ "%*s" /* (11) mount options 2 */
-+ "%*[^\n]", /* some rubbish at the end */
-+ path)) != 1) {
-+#endif /* HAVE_MSFORMAT */
- if (k == EOF)
- break;
-
-@@ -151,7 +170,7 @@
- MountPoint *swap;
- char *dev = NULL, *d;
- int k;
--
-+#ifdef HAVE_MSFORMAT
- if ((k = fscanf(proc_swaps,
- "%ms " /* device/file */
- "%*s " /* type of swap */
-@@ -159,7 +178,16 @@
- "%*s " /* used */
- "%*s\n", /* priority */
- &dev)) != 1) {
--
-+#else
-+ dev = malloc(257);
-+ if ((k = fscanf(proc_swaps,
-+ "%256s " /* device/file */
-+ "%*s " /* type of swap */
-+ "%*s " /* swap size */
-+ "%*s " /* used */
-+ "%*s\n", /* priority */
-+ dev)) != 1) {
-+#endif /* HAVE_MSFORMAT */
- if (k == EOF)
- break;
-
-Index: systemd-208/src/shared/socket-util.c
-===================================================================
---- systemd-208.orig/src/shared/socket-util.c 2013-09-26 11:20:30.000000000 -0700
-+++ systemd-208/src/shared/socket-util.c 2013-11-05 22:01:26.776490078 -0800
-@@ -40,6 +40,8 @@
- #include "missing.h"
- #include "fileio.h"
-
-+#include "config.h"
-+
- int socket_address_parse(SocketAddress *a, const char *s) {
- int r;
- char *e, *n;
-@@ -203,8 +205,16 @@
- a->type = SOCK_RAW;
-
- errno = 0;
-+#ifdef HAVE_MSFORMAT
- if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
-- return errno > 0 ? -errno : -EINVAL;
-+ return errno ? -errno : -EINVAL;
-+#else
-+ sfamily = malloc(257);
-+ if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
-+ free(sfamily);
-+ return errno ? -errno : -EINVAL;
-+ }
-+#endif /* HAVE_MSFORMAT */
-
- family = netlink_family_from_string(sfamily);
- if (family < 0)
-Index: systemd-208/src/tmpfiles/tmpfiles.c
-===================================================================
---- systemd-208.orig/src/tmpfiles/tmpfiles.c 2013-09-17 14:55:37.000000000 -0700
-+++ systemd-208/src/tmpfiles/tmpfiles.c 2013-11-05 22:01:26.776490078 -0800
-@@ -53,6 +53,8 @@
- #include "capability.h"
- #include "specifier.h"
-
-+#include "config.h"
-+
- /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
- * them in the file system. This is intended to be used to create
- * properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -1082,6 +1084,7 @@
- assert(line >= 1);
- assert(buffer);
-
-+#ifdef HAVE_MSFORMAT
- r = sscanf(buffer,
- "%c %ms %ms %ms %ms %ms %n",
- &type,
-@@ -1091,6 +1094,29 @@
- &group,
- &age,
- &n);
-+#else
-+ i->path = malloc(257);
-+ mode = malloc(257);
-+ user = malloc(257);
-+ group = malloc(257);
-+ age = malloc(257);
-+ r = sscanf(buffer,
-+ "%c "
-+ "%256s "
-+ "%256s "
-+ "%256s "
-+ "%256s "
-+ "%256s "
-+ "%n",
-+ &type,
-+ i->path,
-+ mode,
-+ user,
-+ group,
-+ age,
-+ &n);
-+#endif /* HAVE_MSFORMAT */
-+
- if (r < 2) {
- log_error("[%s:%u] Syntax error.", fname, line);
- return -EIO;
-Index: systemd-208/src/cryptsetup/cryptsetup-generator.c
-===================================================================
---- systemd-208.orig/src/cryptsetup/cryptsetup-generator.c 2013-09-30 09:57:04.000000000 -0700
-+++ systemd-208/src/cryptsetup/cryptsetup-generator.c 2013-11-05 22:01:26.776490078 -0800
-@@ -31,6 +31,8 @@
- #include "strv.h"
- #include "fileio.h"
-
-+#include "config.h"
-+
- static const char *arg_dest = "/tmp";
- static bool arg_enabled = true;
- static bool arg_read_crypttab = true;
-@@ -420,7 +422,16 @@
- if (*l == '#' || *l == 0)
- continue;
-
-+#ifdef HAVE_MSFORMAT
- k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options);
-+#else
-+ name = malloc(257);
-+ device = malloc(257);
-+ password = malloc(257);
-+ options = malloc(257);
-+ k = sscanf(l, "%256s %256s %256s %256s", name, device, password, options);
-+#endif /* HAVE_MSFORMAT */
-+
- if (k < 2 || k > 4) {
- log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
- r = EXIT_FAILURE;