Accepting request 761945 from devel:kubic:ignition
- Add 0001-Throw-error-if-SSH-keys-could-not-be-written.patch: Don't silently ignore if the SSH key could not be written [boo#1159232] OBS-URL: https://build.opensuse.org/request/show/761945 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ignition?expand=0&rev=9
This commit is contained in:
commit
377fc84da0
29
0001-Throw-error-if-SSH-keys-could-not-be-written.patch
Normal file
29
0001-Throw-error-if-SSH-keys-could-not-be-written.patch
Normal file
@ -0,0 +1,29 @@
|
||||
commit 7d5235ce7ab91ec21e50f09295dd40fd59a98005
|
||||
Author: Ignaz Forster <iforster@suse.com>
|
||||
Date: Wed Jan 8 17:29:55 2020 +0100
|
||||
References: [boo#1159232]
|
||||
Upstream: Merged [gh#coreos/ignition#908]
|
||||
|
||||
Throw error if SSH keys could not be written
|
||||
|
||||
diff --git a/internal/exec/util/passwd.go b/internal/exec/util/passwd.go
|
||||
index 5d961e3..55c378c 100644
|
||||
--- a/internal/exec/util/passwd.go
|
||||
+++ b/internal/exec/util/passwd.go
|
||||
@@ -173,11 +173,14 @@ func (u Util) AuthorizeSSHKeys(c types.PasswdUser) error {
|
||||
}
|
||||
|
||||
if distro.WriteAuthorizedKeysFragment() {
|
||||
- writeAuthKeysFile(usr, filepath.Join(usr.HomeDir, ".ssh", "authorized_keys.d", "ignition"), []byte(ks))
|
||||
+ err = writeAuthKeysFile(usr, filepath.Join(usr.HomeDir, ".ssh", "authorized_keys.d", "ignition"), []byte(ks))
|
||||
} else {
|
||||
- writeAuthKeysFile(usr, filepath.Join(usr.HomeDir, ".ssh", "authorized_keys"), []byte(ks))
|
||||
+ err = writeAuthKeysFile(usr, filepath.Join(usr.HomeDir, ".ssh", "authorized_keys"), []byte(ks))
|
||||
}
|
||||
|
||||
+ if err != nil {
|
||||
+ return fmt.Errorf("failed to set SSH key: %v", err)
|
||||
+ }
|
||||
return nil
|
||||
}, "adding ssh keys to user %q", c.Name)
|
||||
}
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 8 17:47:30 UTC 2020 - Ignaz Forster <iforster@suse.com>
|
||||
|
||||
- Add 0001-Throw-error-if-SSH-keys-could-not-be-written.patch:
|
||||
Don't silently ignore if the SSH key could not be written
|
||||
[boo#1159232]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 23 09:16:22 UTC 2019 - iforster@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ignition
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -24,6 +24,7 @@ License: Apache-2.0
|
||||
Group: System/Management
|
||||
URL: https://github.com/coreos/ignition
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
Patch1: 0001-Throw-error-if-SSH-keys-could-not-be-written.patch
|
||||
Requires: dracut
|
||||
BuildRequires: dracut
|
||||
BuildRequires: libblkid-devel
|
||||
@ -40,6 +41,7 @@ applies the configuration.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
sed -i -e 's|go build -ldflags|go build -buildmode=pie -ldflags|g' build
|
||||
|
Loading…
Reference in New Issue
Block a user