sudo TRUE; - code gets stuck
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 737
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
When I set sudo TRUE; running rex got stuck. Using -d I fund that the problem is this command
sudo -p '' -S sh -c "LC_ALL=C ; export LC_ALL; which perl "
being stuck. (It does not even ask for password, probably because of the -p '')
All this because I was trying to restrict the command the user can execute using sudo.
I can, of course, add sudo to the individual commands I execute, but I am not sure if this behaviour is correct. shouldn't sudo TRUE; mean every user-generated command is executed with sudo?
Why are the internal Rex-commands executed with sudo?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the hang with sudo TRUE; and the reported sudo -p '' -S sh -c "LC_ALL=C ; export LC_ALL; which perl " command, using Rex's -d option. Trace how the sudo setting is applied to user-generated and internal commands, then define and test the intended behavior for restricted sudo execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl, shell
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100