Bug 38610
| Summary: | strange behavior with suid perl programs | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <robertk> |
| Component: | perl | Assignee: | Chip Turner <cturner> |
| Status: | CLOSED DUPLICATE | QA Contact: | David Lawrence <dkl> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2006-02-21 18:47:58 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is a duplicate of bug 44001, or the other way around :-) *** This bug has been marked as a duplicate of 56537 *** Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |
This is a very minor bug with an easy workaround but it points to strangeness that should probably be investigated. # pwd /home # ls -l perltest -rwsr-xr-x 1 root root 241 May 1 10:24 perltest # cat perltest #!/usr/bin/perl -wT # required for SUID programs $ENV{PATH}="/bin:/usr/bin"; $ENV{BASH_ENV}=""; print "1\n"; print `whoami`; print "2\n"; print `whoami ; whoami`; print "3\n"; print `whoami ; whoami ; whoami`; print "4\n"; print `whoami`; # --- end of perl listing # su nobody $ ./perltest 1 root 2 nobody nobody 3 nobody nobody nobody 4 root The above output is in rh 7.0 and 7.1 Note that whoami incorrectly returns nobody instead of root when there are semicolons in the command. rh 6.2 works correctly with the following output: # su nobody $ ./perltest 1 root 2 root root 3 root root root 4 root