Re: Odd filesystem permission handling

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sat, 19 Jun 1999 14:52:56 +0200 (MEST)


Alan Cox wrote:
> > Sorry, Alan. <grabbing the printout of "UNIX PROGRAMMER'S MANUAL". Dated
> > November 3, 1971 (manual, not the printout ;-)>
>
> And I have a genuine V7 manual. mkdir is not a syscall in V7. Someone
> obviously took it out when they updated Unix past the very early versions.

I worked on a PDP11/60 running "unix". The PDP was installed around
'75 or '76. It was running Unix by the time I worked on it ('86).

I remember for sure that mkdir wasn't a syscall on this machine. There
was a setuid mkdir binary that did the magic for you. You could
hardlink to directories, you could chmod files into a directory. Both
were not allowed for normal users, and the system tools would require
an "-f" to force them to do it, even if you were root (for sure on the
ln. I don't remember the chmod).

I remember the setuid mkdir doing something along the lines of:

touch $1
chmod 40755 $1
ln $1 $1/.
ln . $1/..

I remember that after a system crash we ended up with lots of junk in
lost+found. Some of the FILEs there looked quite similar to what you'd
see if you would use cat on a directory. So we chmod-ed them into a
directory, and fsck-ed again. Bingo! a whole bunch of files back...

Yes, those were the days....

But what the F... is all this doing on linux-kernel?

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/