Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
chmod +s not working as expected

chmod +s not working as expected

2003-11-27       - By Cameron Simpson

 Back
Reply:     1     2     3     4     5  

On 14:45 27 Nov 2003, James Ho <james.ho@(protected)> wrote:
| I just transported a program from Red Hat Linux 6.2 to Red Hat Linux 7.3.
| The C program has a line stating:
|         system ("whoami");
|
| The permission of the executable is 6777 (ie. -rwsrwsrwx) and the
| owner of the program is "user1".
|
| Using another user login "user99", I execute the program in both Red Hat
| Linux 6.2 and 7.3.
|     In 6.2, I get the output "user1"
|     In 7.3, I get the output "user99"
|
| Why is this? Is there any way I can get the program work as it did
| in Red Hat Linux 6.2?

I can imagine the kernel not allowing setuid to work on a publicly
writable file. The 7.3 box will have a newer (==> maybe more paranoid)
kernel. Try making the permissions 6555 or 6111 and see how it behaves.

Cheers,
--
Cameron Simpson <cs@(protected)> DoD#743
http://www.cskk.ezoshosting.com/cs/

If you 'aint falling off, you ar'nt going hard enough.  - Fred Gassit