Bug 38610 - strange behavior with suid perl programs
strange behavior with suid perl programs
Status: CLOSED DUPLICATE of bug 56537
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
7.1
i386 Linux
low Severity low
: ---
: ---
Assigned To: Chip Turner
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-01 13:41 EDT by Need Real Name
Modified: 2006-02-21 13:47 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:47:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-05-01 13:41:06 EDT
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
Comment 1 Radu Greab 2001-11-27 07:10:39 EST
This is a duplicate of bug 44001, or the other way around :-)
Comment 2 Chip Turner 2003-04-11 16:36:11 EDT

*** This bug has been marked as a duplicate of 56537 ***
Comment 3 Red Hat Bugzilla 2006-02-21 13:47:58 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.