Right ... tools like tar(1) called the system call directly,
Which is why the restriction/check in the research family was done in the
OS.
The PWB kernel did not make the check - although V6 did:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/sys/ken/sys4.c
chown()
{
register *ip;
if (!suser() || (ip = owner()) == NULL)
return;
ip->i_uid = u.u_arg[1].lobyte;
ip->i_gid = u.u_arg[1].hibyte;
ip->i_flag =| IUPD;
iput(ip);
}
Where as: PWB 1.0:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/sys/os/sys4.c
chown()
{
register *ip;
if ((ip = owner()) == NULL)
return;
ip->i_uid = u.u_arg[1].lobyte;
ip->i_gid = u.u_arg[1].hibyte;
if(u.u_uid != 0)
ip->i_mode =& ~(ISUID|ISGID);
ip->i_flag =| IUPD;
iput(ip);
}
Clem
On Thu, Jan 9, 2014 at 1:31 PM, Ron Natalie <ron(a)ronnatalie.com> wrote:
There's no real point in restricting the chown
program if the system call
remains executable by non-root.
-----Original Message-----
From: tuhs-bounces(a)minnie.tuhs.org [mailto:tuhs-bounces@minnie.tuhs.org]
On
Behalf Of Dario Niedermann
Sent: Thursday, January 9, 2014 1:18 PM
To: tuhs(a)minnie.tuhs.org
Subject: Re: [TUHS] History of chown semantics
Il 09/01/2014 alle 15:56, Clem Cole ha scritto:
I agree with you, I always thought it was crazy
[...]
Maybe I'm missing something, but it seems easy enough to make the `chown'
program only executable by root.
_______________________________________________
TUHS mailing list
TUHS(a)minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs
_______________________________________________
TUHS mailing list
TUHS(a)minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs