feat: read the host's listening sockets through napalm-device-types

LinuxDriver mixes in ListeningSocketsMixin (napalm-device-types 2.4.0) and
supplies its transport: privileged readings go through _run_privileged --
as they are for a root login, through sudo with a password, sudo -n
without one -- and the rest through _send. The command arrives as one
sh -c argument, so sudo covers the whole script; when sudo refuses, the
mixin reads again without it.

OpenMediaVault and QNAP QTS inherit it; a host without ss raises
ListeningSocketsUnavailable.

For netOrk#658.
This commit is contained in:
Christian Manivong
2026-10-06 18:19:31 +02:00
parent 3571149639
commit 79e52f060e
3 changed files with 80 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ classifiers = [
]
dependencies = [
"napalm>=4.0",
"napalm-device-types>=2.3.0",
"napalm-device-types>=2.4.0",
"netmiko>=4.0.0",
"paramiko>=5.0.0", # CVE-2026-44405
]