Skip to main content

apply_drop_in_shell_script

Function apply_drop_in_shell_script 

Source
pub fn apply_drop_in_shell_script(choice: SudoTimestampChoice) -> String
Expand description

What: Build a POSIX shell script that validates and installs the drop-in with sudo.

Inputs:

  • choice: Selected cache duration.

Output:

  • A script suitable for spawn_shell_commands_in_terminal: writes temp file, visudo -cf, install -m 0440.

Details:

  • Ends with read so the user can see success/failure in an external terminal.
  • Uses SUDOERS_DROP_IN_PATH as the destination path.