Commit Graph
1 Commits
Author SHA1 Message Date
Christian Manivong 248c87009f fix(config): import replace and rollback configs through a private temporary file (#45)
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 51s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 36s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped
A replace commit_config() and rollback() wrote the config as root to a
fixed name in /tmp (/tmp/napalm_candidate.uci, /tmp/napalm_rollback.uci)
and imported it with a second command. A local account could place that
file beforehand, or swap it in between, and have its own config imported
and committed (NetOrk/netork#2446).

Each import is now one command: a mktemp file made under umask 077, the
config written to it, `uci import < "$f" && uci commit`, then the file
removed.
2026-11-12 22:32:46 +01:00