system

Doug Gwyn gwyn at brl-smoke.ARPA
Mon Feb 8 22:09:56 AEST 1988


In article <2824 at cbdkc1.ATT.COM> pmd at cbdkc1.UUCP (Paul Dubuc) writes:
>After the mknod(), you need two calls to link() to make it properly:
[...]
>I never understood why making directories was a super user priviledge.

Because, if the links weren't done right, the directory hierarchy could
be turned into a royal mess.  Therefore only a limited amount of
(presumably carefully-checked) code was permitted to make directories,
and everything else had to ask the privileged process to help get it
right.  Indeed, this is the main point of the "superuser" on UNIX;
far from being a security problem, as you read in various places, it
is the minimum mechanism that is absolutely necessary to ensure that
important system operations are carried out securely.  Unfortunately
a lot of people who don't grok simplicity are working to pile a mess
of more conventional layered security features on UNIX.  Too bad.



More information about the Comp.lang.c mailing list