mirror of
https://github.com/flatcar/scripts.git
synced 2026-03-07 06:21:13 +01:00
Merge pull request #2696 from flatcar/dongsu/wa-linux-agent-4152
overlay wa-linux-agent: apply patch to fix ssh public key override issue (stable, beta)
This commit is contained in:
commit
3728bbd4b6
1
changelog/bugfixes/2025-02-28-walinuxagent-ignition.md
Normal file
1
changelog/bugfixes/2025-02-28-walinuxagent-ignition.md
Normal file
@ -0,0 +1 @@
|
||||
- Fix issue of wa-linux-agent overriding ssh public key from ignition configuration during provisioning ([flatcar/Flatcar#1661](https://github.com/flatcar/Flatcar/issues/1661))
|
||||
@ -0,0 +1,26 @@
|
||||
From 0c8db73c3567039e50ffa7447bb093ca812dedf6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0c8db73c3567039e50ffa7447bb093ca812dedf6.1740577844.git.dpark@linux.microsoft.com>
|
||||
From: Peyton Robertson <93797227+peytonr18@users.noreply.github.com>
|
||||
Date: Tue, 28 Jan 2025 14:17:43 -0800
|
||||
Subject: [PATCH] Applying patch to prevent ssh public key override (#3309)
|
||||
|
||||
---
|
||||
azurelinuxagent/common/osutil/default.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py
|
||||
index 584515dc..746c4363 100644
|
||||
--- a/azurelinuxagent/common/osutil/default.py
|
||||
+++ b/azurelinuxagent/common/osutil/default.py
|
||||
@@ -346,7 +346,7 @@ GEN2_DEVICE_ID = 'f8b3781a-1e82-4818-a1c3-63d806ec15bb'
|
||||
raise OSUtilError("Bad public key: {0}".format(value))
|
||||
if not value.endswith("\n"):
|
||||
value += "\n"
|
||||
- fileutil.write_file(path, value)
|
||||
+ fileutil.write_file(path, value, append=True)
|
||||
elif thumbprint is not None:
|
||||
lib_dir = conf.get_lib_dir()
|
||||
crt_path = os.path.join(lib_dir, thumbprint + '.crt')
|
||||
--
|
||||
2.39.5
|
||||
|
||||
@ -30,4 +30,5 @@ S="${WORKDIR}/WALinuxAgent-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/0001-flatcar-changes.patch"
|
||||
"${FILESDIR}/0002-prevent-ssh-public-key-override.patch"
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user