Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
func Cleanup(dst string)
Cleanup removes the installed sudoers entry at dst. Intended for rollback handlers; errors are logged to stdout but not returned.
func ValidateContent ¶
ValidateContent checks that content is structurally valid sudoers syntax. It joins continuation lines then verifies that each non-comment, non-empty logical line contains a host/runas separator ('='), a command tag (':'), and only absolute-path commands. This catches the most common malformations that would break sudo without requiring a shell invocation.
func WriteEntry ¶
WriteEntry validates content then atomically installs it at dst with mode 0o440. Delegates to fsx.AtomicWriteFile so partial writes are never visible to sudo.
Types ¶
This section is empty.