Bug 57682 - not working in setuid mode
Summary: not working in setuid mode
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-18 20:57 UTC by shardul d. khatri
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-11-16 15:04:50 UTC
Embargoed:


Attachments (Terms of Use)

Description shardul d. khatri 2001-12-18 20:57:28 UTC
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
#include<stdlib.h>
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 
result
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:
Always

Steps to Reproduce:
#include<stdlib.h>
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-09 00:36:17 UTC
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.