Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!bloom-beacon!bu-cs!bucsb.bu.edu!madd
From: madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost)
Newsgroups: comp.os.minix
Subject: Re: SETUID on mkdir and rmdir
Message-ID: <1039@bucsb.bu.edu.UUCP>
Date: Sat, 11-Jul-87 16:58:18 EDT
Article-I.D.: bucsb.1039
Posted: Sat Jul 11 16:58:18 1987
Date-Received: Sun, 12-Jul-87 16:53:44 EDT
References: <1478@ncc.UUCP> <14338@teknowledge-vaxc.ARPA>
Reply-To: madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost)
Organization: ODO (Organization for the Disorganization of Organization)
Lines: 40
Summary: probably use setuid() functions

In article <14338@teknowledge-vaxc.ARPA> mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) writes:
>in article <1478@ncc.UUCP>, lyndon@ncc.UUCP (Lyndon Nerenberg) says:
>-> 
>-> In article <8707030732.a029212@Louie.UDEL.EDU>, ESC1332@ESOC (K.Keyte) writes:
>->> 
>->> Does everyone have SETUID on their mkdir and rmdir?  Standard UNIX does
>->> not, as the mkdir and rmdir are just normal file operations. 
>-> 
>-> Hate to disappoint you, but...
>-> 
>-> -rwsr-xr-x   1 root     bin        14378 Mar  9  1985 /bin/mkdir
>-> -rwsr-xr-x   1 root     bin        14580 Mar  9  1985 /bin/rmdir
>-> 
>-> This taken from a machine running System V.
>
>Ultrix 1.2:
>-rwxr-xr-x  1 root     system       9216 Feb 19  1986 /bin/mkdir
>-rwxr-xr-x  1 root     system       9216 Feb 19  1986 /bin/rmdir
>
>Sun 3.2:
>-rwxr-xr-x  1 root     staff       16388 Sep 15  1986 /bin/mkdir
>-rwxr-xr-x  1 root     staff       16384 Sep 15  1986 /bin/rmdir
>
>So why does SysV need them suid and not 4bsd?
>
>Mike Khaw

Perhaps BSD (and BSD'ish) UNIX supplies programs that make use of the
setuid() series of functions.  You will notice that all of those
programs are owned by root -- therefore, setting the effective uid to
root (possible because root owns the program, right?) will allow
root-only function calls.  (note that I don't usually use the setuid()
functions, so I may have confused the notions of "real uid" and
"effective uid", but the idea still holds).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          Jim Frost * The Madd Hacker | UUCP: ..!harvard!bu-cs!bucsb!madd
  H H                                 | ARPA:           madd@bucsb.bu.edu
H-C-C-OH <- heehee          +---------+----------------------------------
  H H                       | "We are strangers in a world we never made"