  | | | chmod +s not working as expected | chmod +s not working as expected 2003-11-27 - By James Ho
Back nope... does not work. -- -- Original Message -- -- From: Cameron Simpson To: valhalla-list@(protected) Sent: Thursday, November 27, 2003 3:19 PM Subject: Re: chmod +s not working as expected
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
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Valhalla-list mailing list Valhalla-list@(protected) https://www.redhat.com/mailman/listinfo/valhalla-list
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>nope... does not work.</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=cs@(protected) href="mailto:cs@(protected)">Cameron Simpson</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=valhalla-list@(protected) href="mailto:valhalla-list@(protected)">valhalla-list@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 27, 2003 3:19 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: chmod +s not working as expected</DIV> <DIV><BR></DIV>On 14:45 27 Nov 2003, James Ho <<A href="mailto:james.ho@(protected)">james.ho@(protected)</A>> wrote:<BR>| I just transported a program from Red Hat Linux 6.2 to Red Hat Linux 7.3.<BR>| The C program has a line stating:<BR>| system ("whoami");<BR>| <BR>| The permission of the executable is 6777 (ie. -rwsrwsrwx) and the<BR>| owner of the program is "user1".<BR>| <BR>| Using another user login "user99", I execute the program in both Red Hat <BR>| Linux 6.2 and 7.3.<BR>| In 6.2, I get the output "user1"<BR>| In 7.3, I get the output "user99"<BR>| <BR>| Why is this? Is there any way I can get the program work as it did<BR>| in Red Hat Linux 6.2?<BR><BR>I can imagine the kernel not allowing setuid to work on a publicly<BR>writable file. The 7.3 box will have a newer (==> maybe more paranoid)<BR>kernel. Try making the permissions 6555 or 6111 and see how it behaves.<BR><BR>Cheers,<BR>-- <BR>Cameron Simpson <<A href="mailto:cs@(protected)">cs@(protected)</A>> DoD#743<BR><A href="http://www.cskk.ezoshosting.com/cs/">http://www.cskk.ezoshosting.com/cs /</A><BR><BR>If you 'aint falling off, you ar'nt going hard enough. - Fred Gassit<BR><BR><BR>__ ____ ____ ____ ____ ____ ____ ____ ____ ____<BR>Valhalla -list mailing list<BR><A href="mailto:Valhalla-list@(protected)">Valhalla-list@(protected)</A><BR><A href="https://www.redhat.com/mailman/listinfo/valhalla-list">https://www .redhat.com/mailman/listinfo/valhalla-list</A><BR></BLOCKQUOTE></BODY></HTML>
|
|
 |