mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-10 13:11:34 +01:00
overlay wa-linux-agent: apply patch to fix ssh public key override issue
Apply patch to fix an issue when overriding ssh public key from ignition configuration. Since the fix is not available in releases of wa-linux-agent, we should apply a separate patch. See also https://github.com/Azure/WALinuxAgent/pull/3309.
This commit is contained in:
parent
2671f46280
commit
c37d8592cd
@ -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