CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 25s
CI / test (3.10) (pull_request) Successful in 29s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 25s
run_command prepended the sudo password to the caller's stdin. A sudo that does not prompt left it for the command, and fix_snmp's 'cat > snmpd.conf' wrote it as the configuration's first line before making the file world-readable. run_command now refuses stdin to a privileged command while a sudo password is set. fix_snmp stages the configuration in a mktemp file without privilege, and root installs it next to the target and renames it over, so nothing root runs follows a symlink. Closes #8
3.0 KiB
3.0 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.2.1] - 2026-10-16
Fixed
- A sudo password no longer ends up in
snmpd.conf.run_commandsent the password and the data on the same stdin, and a sudo that does not prompt (NOPASSWD, a cached timestamp) left the password forcat, which wrote it as the first line of a file then made world-readable (#8).run_commandnow refuses stdin to a privileged command while a sudo password is set, andfix_snmpstages the configuration without privilege before root installs it, without following a symlink at the target.
[0.2.0] - 2026-10-13
Changed
get_usersis nowget_os_users, as napalm-device-types 4.7 names it onOSDriver; the return shape is unchanged. NAPALM's ownget_usershas another shape and a stub on every driver, so a poll askinghasattrcould not tell the two apart. Requires napalm-device-types 4.7.1 or later.
[0.1.0]
Added
FreeBSDDriver(freebsd) andOpenBSDDriver(openbsd) on a sharedBsdDriver: SSH over exec channels (no PTY, real exit codes), root throughsudo -Swith the password on stdin.- Read side (NetOrk/netork#798): facts (SMBIOS through
kenvon FreeBSD,hw.*sysctls on OpenBSD; uptime fromkern.boottime), interfaces and their addresses (ifconfig -a), routes (netstat -rn), ARP (arp -an), users and groups, processes (ps … lstart), cron jobs (system crontab and the login user's). get_listening_sockets()in the shape ofListeningSocketsMixin: FreeBSD throughsockstat, OpenBSD throughfstatas root andnetstat -anwithout, which the reading reports asattributed: False.- Packages:
get_packages,install_package,uninstall_package. FreeBSD's install bootstraps pkg on a classic system that never had it. - Updates:
get_available_updates, with VuXML's verdict assecurityon FreeBSD and base-system patches as onebase-systementry (OpenBSDsyspatch, classic FreeBSDfreebsd-update). A reader that cannot read raises instead of returning no updates (#4). - Services:
get_servicesandmanage_service(start, stop, restart, enable, disable) throughserviceandrcctl. - SNMP:
run_device_action("fix_snmp")installs net-snmp, writes the same configuration netOrk uses on Linux, starts the agent and asks it for sysDescr;get_snmp_configreports a running agent's community and port. get_host_status(napalm-device-types'HostStatusMixin): on FreeBSD, "reboot required" when the installed kernel differs from the running one.first_boot_pending(): whether a FreeBSD host is still in its first boot (/firstboot), so netOrk can wait before setting up a new VM (NetOrk/netork#795).- Parsers tested on output recorded from FreeBSD 15.1 (hand-installed and cloud image) and OpenBSD 7.9 (NetOrk/netork#793).