Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsurePrivileges ¶
func EnsurePrivileges() error
EnsurePrivileges ensures the process has the necessary privileges (CAP_NET_ADMIN and optionally CAP_SYS_ADMIN). If not running with sufficient privileges, it re-executes itself with sudo + setpriv. This function should be called early in main() before any privileged operations. Assumes the process is always started as a regular user.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.