mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Strange SGID-Bit behavior with 2.2. and 2.4
@ 2001-09-20 12:24 Richard Mueller
  2001-09-20 16:00 ` Ryan W. Maple
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Mueller @ 2001-09-20 12:24 UTC (permalink / raw)
  To: linux-kernel

Hello almighty kernelgods...

a friend and I discovered some strange diffrence in the beahavior
of the 2.4, 2.2 Kernels.

Following Commands were done on both kernels:
---------------------------------------------
su -
cd /
mkdir test
chmod 2755 test
chown rdd test
su rdd
cd /test
touch a
chgrp users a
chmod 7777 a
cp a b
cp /bin/ls d
chgrp users d
chmod 7777 d
cp d e

These results are on 2.4.6
--------------------------
drwxr-sr-x    2 rdd      root          190 Sep 14 15:17 .
drwxr-xr-x   22 root     root          455 Sep 14 14:59 ..
-rwsrwsrwt    1 rdd      users           0 Sep 14 15:00 a
-rwsr-sr-t    1 rdd      root            0 Sep 14 15:02 b
   -->^<-- What's that?
-rwsrwsrwt    1 rdd      users       46568 Sep 14 15:07 d
-rwxr-xr-t    1 rdd      root        46568 Sep 14 15:08 e


And these on 2.2.16
-------------------
drwxr-sr-x   2 rdd      root          103 Sep 14 15:13 .
drwxr-xr-x  20 root     root          369 Sep 14 15:10 ..
-rwsrwsrwt   1 rdd      users           0 Sep 14 15:12 a
-rwsr-xr-t   1 rdd      root            0 Sep 14 15:12 b
-rwsrwsrwt   1 rdd      users       41552 Sep 14 15:12 d
-rwsr-xr-t   1 rdd      root        41552 Sep 14 15:13 e

It happens both with ext2 and reiserfs.


Can anyone explain this behavior? Would be great.

If this is a damn stupid question, please drop it and kill me. :|


Richard Mueller


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Strange SGID-Bit behavior with 2.2. and 2.4
  2001-09-20 12:24 Strange SGID-Bit behavior with 2.2. and 2.4 Richard Mueller
@ 2001-09-20 16:00 ` Ryan W. Maple
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan W. Maple @ 2001-09-20 16:00 UTC (permalink / raw)
  To: Richard Mueller; +Cc: linux-kernel


Did you upgrade/patch your fileutils anytime in between?  Check this URL
out:

  http://www.mail-archive.com/bug-fileutils@gnu.org/msg00934.html

cp was not clearing the SUID and SGID bits in the absense of -p.

Cheers,
Ryan

 +-- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --+
   Ryan W. Maple          "I dunno, I dream in Perl sometimes..."  -LW
   Guardian Digital, Inc.                     ryan@guardiandigital.com
 +-- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --+


On Thu, 20 Sep 2001, Richard Mueller wrote:

> Hello almighty kernelgods...
> 
> a friend and I discovered some strange diffrence in the beahavior
> of the 2.4, 2.2 Kernels.
> 
> Following Commands were done on both kernels:
> ---------------------------------------------
> su -
> cd /
> mkdir test
> chmod 2755 test
> chown rdd test
> su rdd
> cd /test
> touch a
> chgrp users a
> chmod 7777 a
> cp a b
> cp /bin/ls d
> chgrp users d
> chmod 7777 d
> cp d e
> 
> These results are on 2.4.6
> --------------------------
> drwxr-sr-x    2 rdd      root          190 Sep 14 15:17 .
> drwxr-xr-x   22 root     root          455 Sep 14 14:59 ..
> -rwsrwsrwt    1 rdd      users           0 Sep 14 15:00 a
> -rwsr-sr-t    1 rdd      root            0 Sep 14 15:02 b
>    -->^<-- What's that?
> -rwsrwsrwt    1 rdd      users       46568 Sep 14 15:07 d
> -rwxr-xr-t    1 rdd      root        46568 Sep 14 15:08 e
> 
> 
> And these on 2.2.16
> -------------------
> drwxr-sr-x   2 rdd      root          103 Sep 14 15:13 .
> drwxr-xr-x  20 root     root          369 Sep 14 15:10 ..
> -rwsrwsrwt   1 rdd      users           0 Sep 14 15:12 a
> -rwsr-xr-t   1 rdd      root            0 Sep 14 15:12 b
> -rwsrwsrwt   1 rdd      users       41552 Sep 14 15:12 d
> -rwsr-xr-t   1 rdd      root        41552 Sep 14 15:13 e
> 
> It happens both with ext2 and reiserfs.
> 
> 
> Can anyone explain this behavior? Would be great.
> 
> If this is a damn stupid question, please drop it and kill me. :|
> 
> 
> Richard Mueller
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-20 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-20 12:24 Strange SGID-Bit behavior with 2.2. and 2.4 Richard Mueller
2001-09-20 16:00 ` Ryan W. Maple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®