mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 20:06:22 -05:00
* VPN: read only the VPN files the Controller writes controller.yaml's vpn.config_file and vpn.auth_file were joined to the config directory as-is. The tunnel runs as root, so an absolute or ../ path would have it read (and send to the VPN server) any file, and the Controller API would return any file's text as the VPN config. Both now accept only vpn/wireguard.conf, vpn/openvpn.ovpn, and vpn/openvpn-auth.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * VPN: refuse a VPN file which links outside the vpn directory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * VPN: read each VPN file once, never through a symlink The check resolved the path, then the file was opened again later: by root OpenVPN for the login (--auth-nocache re-reads it). The wrolpi user, who owns the library, could swap the file for a symlink in between. read_vpn_file() opens with O_NOFOLLOW and reads once. OpenVPN gets a 0600 copy of the login in the run directory, removed when the tunnel goes down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| admin.py | ||
| captive_portal.py | ||
| config.py | ||
| disks.py | ||
| docker_services.py | ||
| fstab.py | ||
| fstab_migration.py | ||
| fstab_yaml.py | ||
| mount_executor.py | ||
| mount_runner.py | ||
| onboarding.py | ||
| readiness.py | ||
| reconciler.py | ||
| rsyncd.py | ||
| samba.py | ||
| scripts.py | ||
| smart.py | ||
| status.py | ||
| status_worker.py | ||
| sync.py | ||
| systemd.py | ||
| vpn.py | ||
| wrol_mode.py | ||