The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: clemc@ccc.com (Clem Cole)
Subject: [TUHS] History of chown semantics
Date: Thu, 9 Jan 2014 13:48:04 -0500	[thread overview]
Message-ID: <CAC20D2Obm-vsc5kz59DssCmw7pyw-X5WMBcLD3oYd50GTLX=CQ@mail.gmail.com> (raw)
In-Reply-To: <013901cf0d69$01e11890$05a349b0$@ronnatalie.com>

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 at 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 at minnie.tuhs.org [mailto:tuhs-bounces at minnie.tuhs.org]
> On
> Behalf Of Dario Niedermann
> Sent: Thursday, January 9, 2014 1:18 PM
> To: tuhs at 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 at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
>
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20140109/1a469662/attachment.html>


  reply	other threads:[~2014-01-09 18:48 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 10:59 Tim Bradshaw
2014-01-09 12:46 ` Ronald Natalie
2014-01-09 14:56   ` Clem Cole
2014-01-09 15:17     ` Tim Bradshaw
2014-01-09 15:31       ` Clem Cole
2014-01-09 18:18     ` Dario Niedermann
2014-01-09 18:31       ` Ron Natalie
2014-01-09 18:48         ` Clem Cole [this message]
2014-01-09 19:48           ` Armando Stettner
2014-01-09 19:52             ` Clem Cole
2014-01-09 18:37       ` Tim Bradshaw
2014-01-09 18:55       ` Warner Losh
2014-01-10 16:20     ` Ed Carp
2014-01-09 17:01 ` Jeremy C. Reed
2014-01-09 18:40   ` Clem Cole
2014-01-09 19:13   ` John Cowan
2014-01-09 20:19     ` Tim Newsham
2014-01-09 20:43       ` Warner Losh
2014-01-10 10:09     ` Tim Bradshaw
2014-01-10 17:18       ` John Cowan
2014-01-12 21:19         ` Tim Bradshaw
2014-01-13  7:05           ` John Cowan
2014-01-13 10:37             ` Tim Bradshaw
2014-01-13 16:15               ` John Cowan
2014-01-13 16:53                 ` SZIGETI Szabolcs
2014-01-13 18:16                   ` John Cowan
2014-01-09 22:57 ` Cyrille Lefevre
2014-01-09 19:23 Brian S Walden
2014-01-09 19:51 ` Clem Cole
2014-01-09 21:29 Brian S Walden
2014-01-09 22:03 ` Clem Cole
2014-01-10  0:59   ` John Cowan
2014-01-10  4:28   ` Greg 'groggy' Lehey
2014-01-10 10:15     ` Tim Bradshaw
2014-01-09 21:43 Doug McIlroy
2014-01-10  0:15 Brian S Walden
2014-01-10  1:01 ` Larry McVoy
2014-01-10 15:16   ` Clem Cole
2014-01-10 15:21     ` Larry McVoy
2014-01-10  1:41 Brian S Walden
2014-01-10 13:17 ` scj
2014-01-10 14:03   ` Ronald Natalie
2014-01-10 14:55 Brian S Walden
2014-01-10 17:05 ` Ron Natalie
2014-01-10 17:08 Brian S Walden
     [not found] <mailman.1.1389661202.22836.tuhs@minnie.tuhs.org>
2014-01-14 22:44 ` Pepe
2014-01-15  1:33   ` Warner Losh
2014-01-15  1:43   ` Larry McVoy
2014-01-15  2:13     ` John Cowan
2014-01-15  4:02       ` Chris Nehren
2014-01-15  4:39         ` Steve Nickolas
2014-01-16  8:56 Brian S Walden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC20D2Obm-vsc5kz59DssCmw7pyw-X5WMBcLD3oYd50GTLX=CQ@mail.gmail.com' \
    --to=clemc@ccc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).