From 3bf5f1d8b8a1a9efa53b3e5543eda73f9fa2065e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 13 Dec 2024 09:54:40 +0100 Subject: [PATCH 1/2] vendor: Update ferny to c8713c4d3ba74a This stops hardcoding the libc.so.6 soname, and has a new matcher for OpenSSH 0.9.6's "hostname contains invalid characters" error. --- vendor/ferny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/ferny b/vendor/ferny index f869d10d1251..c8713c4d3ba7 160000 --- a/vendor/ferny +++ b/vendor/ferny @@ -1 +1 @@ -Subproject commit f869d10d12511b0463e71bf3b26e232aa95cbc6d +Subproject commit c8713c4d3ba74a9d8db1ce8e0a15296e6a333257 From c55fd41fc281e08a985e77279140013152af6497 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 13 Dec 2024 09:57:50 +0100 Subject: [PATCH 2/2] src: Stop hardcoding libc soname ia64/alpha has SONAME "libc.so.6.1" `None` works because Python is linked against libc, so the symbol is already in our address space. Fixes #21396 --- src/client/cockpit-client | 4 ++-- src/cockpit/transports.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/cockpit-client b/src/client/cockpit-client index e9260333ed17..55a2411049b2 100755 --- a/src/client/cockpit-client +++ b/src/client/cockpit-client @@ -47,11 +47,11 @@ except (ValueError, ImportError): libexecdir = os.path.realpath(__file__ + '/..') -libc6 = ctypes.cdll.LoadLibrary('libc.so.6') +sys_prctl = ctypes.CDLL(None).prctl def prctl(*args): - if libc6.prctl(*args) != 0: + if sys_prctl(*args) != 0: raise Exception('prctl() failed') diff --git a/src/cockpit/transports.py b/src/cockpit/transports.py index 913603544ac0..4fcf76121ee9 100644 --- a/src/cockpit/transports.py +++ b/src/cockpit/transports.py @@ -33,11 +33,11 @@ from .jsonutil import JsonObject, get_int -libc6 = ctypes.cdll.LoadLibrary('libc.so.6') +sys_prctl = ctypes.CDLL(None).prctl def prctl(*args: int) -> None: - if libc6.prctl(*args) != 0: + if sys_prctl(*args) != 0: raise OSError('prctl() failed')