Bug 57682 - not working in setuid mode
not working in setuid mode
Product: Red Hat Linux
Classification: Retired
Component: pdksh (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2001-12-18 15:57 EST by shardul d. khatri
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-16 10:04:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description shardul d. khatri 2001-12-18 15:57:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
I ahve created one little c program
void main()
 system("cp x /usr/tmp/y");
the owner of this program is X. this program is set in setuid mode. 
Permission is 4755. This program is called by person having login as Z. 
After this program execution a file y is created in the /usr/tmp having 
owner as Z. Actually the owner of file y should be X.That is the expected 
I don't know why this happening. This is not a problem on red hat 7.0. 
Please solve this problem

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
void main()
 system("cp x /usr/tmp/y");

create executable of this file under the login of one person say X. name 
this executable as sample. set the permission of this program as 4755 by 
chmod 4755 sample
Call this sample program from other person login say Y.


Actual Results:  this program will create file y having owner as Y

Expected Results:  this program should create file y having owner as X

Additional info:
Comment 1 Trond Eivind Glomsrxd 2002-01-08 19:36:17 EST
Why do you think that's the expected result? Bash doesn't behave that way either...

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