Skip to content

Commit

Permalink
Add test to sudo_require_reauthentication
Browse files Browse the repository at this point in the history
Cover the case when etc/sudoers contain conflicting entries

Signed-off-by: Edgar Aguilar <[email protected]>
  • Loading branch information
Xeicker committed Nov 15, 2023
1 parent 6b9543c commit 3fc22cf
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# packages = sudo
# variables = var_sudo_timestamp_timeout=0

if grep -q 'timestamp_timeout' /etc/sudoers; then
sed -i 's/.*timestamp_timeout.*/Defaults timestamp_timeout=-1/' /etc/sudoers
else
echo "Defaults timestamp_timeout=-1" >> /etc/sudoers
fi
echo "Defaults timestamp_timeout=0" >> /etc/sudoers

0 comments on commit 3fc22cf

Please sign in to comment.