Compare commits

...
Author SHA1 Message Date
christianmanivong 8b09d5a713 Merge pull request 'feat(kernel): Canonical Livepatch's status as root for the kernel facts, 0.22.0 (NetOrk/netork#2701)' (#90) from feature/live-kernel-patches into main
driver / types (push) Successful in 1m0s
driver / standard (push) Successful in 15s
driver / lint (push) Successful in 13s
driver / test (3.12) (push) Successful in 1m3s
driver / test (3.13) (push) Successful in 51s
driver / lowest (push) Successful in 31s
driver / build (push) Successful in 26s
driver / security (push) Successful in 56s
driver / publish (push) Successful in 24s
CI / driver (push) Successful in 2m52s
2026-11-28 10:28:50 +00:00
christianmanivong 2519113863 Merge pull request 'feat(logins): get_login_accounts through LoginAccountsMixin, 0.21.0 (NetOrk/netork#2707)' (#89) from feature/host-logins into main
driver / types (push) Successful in 1m1s
driver / standard (push) Successful in 16s
driver / lint (push) Successful in 13s
driver / test (3.12) (push) Successful in 1m2s
driver / test (3.13) (push) Successful in 54s
driver / lowest (push) Successful in 27s
driver / build (push) Successful in 31s
driver / security (push) Successful in 1m3s
driver / publish (push) Successful in 28s
CI / driver (push) Successful in 3m4s
2026-11-28 10:06:15 +00:00
Christian Manivong 26dc5a44da Merge feature/host-logins into feature/live-kernel-patches
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m1s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / test (3.12) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m21s
driver / publish (pull_request) Skipped
0.22.0 needs napalm-device-types 4.52.0, where the live patches landed.
2026-11-28 08:23:25 +01:00
Christian Manivong 5132cd5965 chore(release): 0.22.0
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 13s
driver / test (3.12) (pull_request) Failing after 45s
driver / types (pull_request) Failing after 51s
driver / test (3.13) (pull_request) Failing after 42s
driver / lowest (pull_request) Failing after 20s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Failing after 1m3s
CI / driver (pull_request) Failing after 2m19s
driver / publish (pull_request) Skipped
2026-11-28 04:23:25 +01:00
Christian Manivong f6fed234cd feat(kernel): Canonical Livepatch's status as root, for the kernel facts (NetOrk/netork#2701)
Where the status does not read without root, the kernel facts read it again
through the driver's sudo: one fixed, read-only command.
2026-11-28 04:23:25 +01:00
4 changed files with 32 additions and 3 deletions

No files matched your search

+9
View File
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.22.0] - 2026-11-28
### Added
- The kernel facts carry the kernel's live patches through napalm-device-types 4.52.0: the
patches loaded in `/sys/kernel/livepatch`, `kpatch list`, and Canonical Livepatch's status
with the CVEs it fixes (NetOrk/netork#2701). Where Canonical's status does not read without
root, `_run_livepatch_status_command` reads it again through the driver's sudo, one fixed,
read-only command that reads no stdin. OpenMediaVault and QNAP have it through `LinuxDriver`.
## [0.21.0] - 2026-11-28
### Added
+7 -1
View File
@@ -11,7 +11,9 @@ would read as clean. It is one fixed command and reads no stdin.
The running backups need no root: every process's command line and cgroup are
readable to the login user (``_running_backups``). How the host is hardened
(``_hardening``) and who can log in to it (``_logins``, NetOrk/netork#2707) are read
as root first, as the login user where root is refused.
as root first, as the login user where root is refused. Canonical Livepatch's status
(napalm-device-types' kernel facts, NetOrk/netork#2701) is read again as root where
it did not read without: one fixed, read-only command, no stdin.
"""
from __future__ import annotations
@@ -60,3 +62,7 @@ class LinuxProcessReadingsMixin(
def _run_services_restart_command(self, command: str) -> str:
return self._run_privileged(command, _READ_TIMEOUT)
def _run_livepatch_status_command(self, command: str) -> str:
"""Canonical Livepatch's status as root, for ``KernelFactsMixin`` (#2701)."""
return self._run_privileged(command, _READ_TIMEOUT)
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "napalm-linux"
version = "0.21.0"
version = "0.22.0"
description = "NAPALM driver for generic Linux systems via SSH"
readme = "README.md"
requires-python = ">=3.12"
@@ -34,7 +34,7 @@ classifiers = [
]
dependencies = [
"napalm>=4.0",
"napalm-device-types>=4.51.0", # LoginAccountsMixin
"napalm-device-types>=4.52.0", # live patches in the kernel facts
"netmiko>=4.0.0",
"paramiko>=5.0.0", # CVE-2026-44405
]
+14
View File
@@ -2838,3 +2838,17 @@ class TestSourceRpmName:
)
def test_the_name_is_what_precedes_version_and_release(self, sourcerpm, name):
assert source_rpm_name(sourcerpm) == name
class TestCanonicalLivepatchAsRoot:
"""The kernel facts read Canonical Livepatch's status (NetOrk/netork#2701); where it did
not read without root, the driver reads it again through its sudo."""
def test_the_status_command_runs_as_root(self, driver):
from napalm_device_types import LIVEPATCH_STATUS_COMMAND
calls = []
driver._run_privileged = lambda command, timeout=100: calls.append(command) or "{}"
assert driver._run_livepatch_status_command(LIVEPATCH_STATUS_COMMAND) == "{}"
assert calls == [LIVEPATCH_STATUS_COMMAND]