The sudo command incorrectly handles quoted arguments with spaces
Issue
- The sudo command incorrectly handles quoted arguments with spaces
Sample test script
cat /home/username/test.sh
echo $1
echo $*
When using sudo to run this test script, the following output is printed
sudo -i -u username /home/username/test.sh "p1 p2"
p1
p1 p2
This is not correct, expected output is:
p1 p2
p1 p2
Environment
- Red Hat Enterprise Linux 5 update 8
- Problem is not seen with sudo-1.7.2p1-14.el5_8.
- Affected sudo package version sudo-1.7.2p1-14.el5_8.2 and sudo-1.7.2p1-14.el5_8.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
