dracut/0534-ssh-client-Include-nss_-libraries.patch
Daniel Molkentin d2c0ca313f Accepting request 517604 from home:dmolkentin:branches:Base:System
- Ensure that targets such as halt can be reached (bsc#1048698)
 * adds 0529-systemd-add-missing-.slice-unit.patch
 * adds 0530-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch
 * adds 0531-dracut-systemd-.service-conflict-with-shutdown-targe.patch
- Do not add too many drivers all at once (bsc#1037344)
 * adds 0532-List-drivers-rather-than-looking-for-reverse-depende.patch
- instmods: check modules.builtin in $srcmods (bsc#1048606)
 * adds 0533-instmods-check-modules.builtin-in-srcmods.patch
- ssh-client: ensure is usable in all cases (bsc#1021846)
 * adds 0535-ssh-client-Include-nss_-libraries.patch
- Sync initramfs after creation to ensure entigrity (bsc#1049113)
 * adds 0536-Sync-initramfs-after-creation.patch

OBS-URL: https://build.opensuse.org/request/show/517604
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=316
2017-08-18 16:12:38 +00:00

41 lines
1.1 KiB
Diff

From 9c2c061b2f1760c96b3cc9bcd38d7c1b5f25061d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
Date: Tue, 15 Aug 2017 15:25:18 +0200
Subject: [PATCH] ssh-client: Include nss_ libraries
SSH uses passwd database and thus need various NSS plugin libraries,
depending upon setting in nsswitch.conf.
SSH binary fails within the dracut environment without the libraries:
#:/ ssh
No user exist for uid 0
---
modules.d/95ssh-client/module-setup.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 0a0e80cd..a6945c1f 100755
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -56,7 +56,16 @@ inst_sshenv()
# called by dracut
install() {
+ local _nsslibs
+
inst_multiple ssh scp
inst_sshenv
+
+ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
+ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
+ _nsslibs=${_nsslibs#|}
+ _nsslibs=${_nsslibs%|}
+
+ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
}
--
2.12.3