SHA256
1
0
forked from pool/systemd
systemd/0001-nspawn-fix-truncation-of-machine-names-in-interface-.patch
Stephan Kulow 8d0e9d5913 Accepting request 246497 from Base:System
- Add upstream patches for hwdb
  0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
  0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
  0003-keymap-Fix-HP-Pavillon-DV7.patch
  0004-hwdb-update-format-description-and-document-reloadin.patch
  0008-hwdb-update.patch

- Port back and add the missed upstream patches from 2014/08/22
  0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
  0006-login-share-VT-signal-handler-between-sessions.patch

- Add upstream patches
  0001-nspawn-fix-truncation-of-machine-names-in-interface-.patch
  0002-switch-root-umount-the-old-root-correctly.patch
  0003-bootchart-it-s-not-OK-to-return-1-from-a-main-progra.patch
  0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
  0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
  0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
  0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
  0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
  0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
  0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
  1063-udev-path_id-suppress-ID_PATH-for-devices-with-an-un.patch

- man pages from section 3 are developer docs, move them to 
 the -devel package.

- Add patch 0001-let-systemctl-completion-ignore-at-names.patch to
  remove error messages for tab completion for systemctl isolate (bnc#892162)

OBS-URL: https://build.opensuse.org/request/show/246497
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=200
2014-08-27 14:53:07 +00:00

32 lines
1.2 KiB
Diff

Based on 4212a3375e03fd12cb407b34cab59dbe4ed9f4eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 3 Aug 2014 01:28:21 -0400
Subject: [PATCH] nspawn: fix truncation of machine names in interface names
Based on patch by Michael Marineau <michael.marineau@coreos.com>:
When deriving the network interface name from machine name strncpy was
not properly null terminating the string and the maximum string size as
returned by strlen() is actually IFNAMSIZ-1, not IFNAMSIZ.
---
src/nspawn/nspawn.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- src/nspawn/nspawn.c
+++ src/nspawn/nspawn.c 2014-08-22 10:18:20.390235611 +0000
@@ -1383,12 +1383,8 @@ static int setup_veth(pid_t pid, char if
/* Use two different interface name prefixes depending whether
* we are in bridge mode or not. */
- if (arg_network_bridge)
- memcpy(iface_name, "vb-", 3);
- else
- memcpy(iface_name, "ve-", 3);
-
- strncpy(iface_name+3, arg_machine, IFNAMSIZ - 3);
+ snprintf(iface_name, IFNAMSIZ, "%s-%s",
+ arg_network_bridge ? "vb" : "ve", arg_machine);
r = sd_rtnl_open(&rtnl, 0);
if (r < 0) {