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);
}
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); }
There's no real point in restricting the chown program if the system call
remains executable by non-root.
-----Original Message-----
From: tuhs-bounces@minnie.tuhs.org [mailto:tuhs-bounces@minnie.tuhs.org] On
Behalf Of Dario Niedermann
Sent: Thursday, January 9, 2014 1:18 PM
To: tuhs@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@minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs
_______________________________________________
TUHS mailing list
TUHS@minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs