fix(channel): a privileged stream sends the sudo password only to a sudo that asks (NetOrk/netork#818)
driver / standard (pull_request) Failing after 16s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Failing after 1m1s
driver / test (3.13) (pull_request) Failing after 54s
driver / lowest (pull_request) Failing after 30s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Failing after 2m41s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Failing after 16s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Failing after 1m1s
driver / test (3.13) (pull_request) Failing after 54s
driver / lowest (pull_request) Failing after 30s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Failing after 2m41s
driver / publish (pull_request) Skipped
open_stream(privileged=True) with a sudo password wrote the password first, for sudo -S. A sudo that does not prompt (NOPASSWD, a cached timestamp) left it on stdin, where it reached the command as the first bytes of the stream: the Podman API, over sudo podman system dial-stdio. The stream now asks sudo first (sudo -n sh -c true) and runs the command through sudo -n when it needs no password.
This commit is contained in:
1 parent
647a5cc857
commit
553b4d5153
3 files changed
+89
-10
No files matched your search
@@ -29,6 +29,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
(`1:6.2.0-13.el9`), as on a dpkg host. Oracle's and Red Hat's fixes name it, and without
|
||||
it an epoch-1 fix read as newer than every installed build (NetOrk/netork#2394).
|
||||
|
||||
### Fixed
|
||||
- `open_stream(privileged=True)` with a sudo password asks sudo first whether it wants it
|
||||
(`sudo -n sh -c true`). A sudo that does not prompt (NOPASSWD, a cached timestamp) used to
|
||||
get the password on stdin anyway, where it went to the command as the first bytes of the
|
||||
stream: into the Podman API, over `sudo podman system dial-stdio` (NetOrk/netork#818).
|
||||
Such a sudo now gets the command through `sudo -n`, and only one that asks gets the
|
||||
password.
|
||||
|
||||
### Added
|
||||
- `get_time_sync()` and `configure_time_sync()` through napalm-device-types'
|
||||
`PosixTimeSyncMixin` (4.35.0): the host's NTP servers in its client's order, its time zone,
|
||||
|
||||
Reference in new issue
Block a user