Skip to content

Commit

Permalink
full-trace.sh: check if the user wants to exit on "sudo -v" command
Browse files Browse the repository at this point in the history
This patch adds a control on the exit state of "sudo -v" command
and make full-trace.sh exits if it's abnormal.
Before, an exit attempt on the first password prompt resulted in
a multiple password check due to the continuation of the program.
Now, an exit attempt on the first password propt results in
the termination of the program with code 1.

Signed-off-by: Serena Ziviani <senseriumi@gmail.com>
Reviewed-by: Arianna Avanzini <avanzini.arianna@gmail.com>
  • Loading branch information
sere authored and andreoli committed Mar 20, 2013
1 parent 794d189 commit 0281cc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions full-trace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ if [[ "$CMDNAME" == "" ]]; then
fi

sudo -v
if [[ $? != 0 ]]; then
exit 1
fi

check_uprobes
if [[ $ignore_config == 0 ]]; then
Expand Down

0 comments on commit 0281cc8

Please sign in to comment.