LinuxDriver mixes in ListeningSocketsMixin (napalm-device-types 2.4.0, NAPALM/napalm-device-types#7) and supplies _run_listening_sockets_command: privileged through _run_privileged (root login as is, sudo -S with a password, sudo -n without), otherwise _send. The command arrives as one sh -c argument, so sudo covers the whole script; when sudo refuses the mixin reads again unprivileged (attributed: false).
OpenMediaVault and QNAP QTS inherit it; QTS has no ss and raises ListeningSocketsUnavailable.
`LinuxDriver` mixes in `ListeningSocketsMixin` (napalm-device-types 2.4.0, NAPALM/napalm-device-types#7) and supplies `_run_listening_sockets_command`: privileged through `_run_privileged` (root login as is, `sudo -S` with a password, `sudo -n` without), otherwise `_send`. The command arrives as one `sh -c` argument, so sudo covers the whole script; when sudo refuses the mixin reads again unprivileged (`attributed: false`).
OpenMediaVault and QNAP QTS inherit it; QTS has no `ss` and raises `ListeningSocketsUnavailable`.
Requires `napalm-device-types>=2.4.0`.
Tests: `TestGetListeningSockets` (root, `sudo -n`, sudo password, refused sudo → unprivileged). Whole suite: 126 passed.
For NetOrk/netork#658.
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
LinuxDrivermixes inListeningSocketsMixin(napalm-device-types 2.4.0, NAPALM/napalm-device-types#7) and supplies_run_listening_sockets_command: privileged through_run_privileged(root login as is,sudo -Swith a password,sudo -nwithout), otherwise_send. The command arrives as onesh -cargument, so sudo covers the whole script; when sudo refuses the mixin reads again unprivileged (attributed: false).OpenMediaVault and QNAP QTS inherit it; QTS has no
ssand raisesListeningSocketsUnavailable.Requires
napalm-device-types>=2.4.0.Tests:
TestGetListeningSockets(root,sudo -n, sudo password, refused sudo → unprivileged). Whole suite: 126 passed.For NetOrk/netork#658.