chore: mark the root-only geteuid read in profiles_service_cleanup as a known non-Windows path

remove_system_systemd_unit() is reached only from the Linux arm of
profiles._cleanup_gateway_service; the Windows footgun lint cannot see
the caller's platform branch.
This commit is contained in:
teknium1
2026-09-28 01:37:18 -07:00
committed by Teknium
parent 07aad347be
commit edbd7f151c

View File

@@ -22,7 +22,7 @@ def remove_system_systemd_unit() -> bool:
unit = gateway._SYSTEM_UNIT_DIR / f"{svc_name}.service"
if not unit.exists():
return False
if os.geteuid() != 0:
if os.geteuid() != 0: # windows-footgun: ok — called only from the Linux arm of profiles._cleanup_gateway_service
print(f"⚠ System service {svc_name} remains at {unit}; it will restart the removed profile at boot.")
print(f" Remove it with: sudo systemctl disable --now {svc_name} && sudo rm {unit} && sudo systemctl daemon-reload")
return False