Re: buglet in ext2 sticky bit?

Frank Wales (frank@arcglade.demon.co.uk)
Wed, 27 Oct 1999 22:23:32 +0100 (BST)


[Explanation of content-dependent files from HP-UX follows. Skip if
you don't care.]

>bill@taniwha.org writes:
>
>> Ob fancy permission bits on directories, what does the suid bit
>> do on a directory?
>
>hex 0x0800
>name S_CDF
>octal 004000
>use HP-UX hidden directory ("context dependent file")
>
>I think this is supposed to be like the old transnames patch for
>Linux, but I can't find any details.

CDFs were part of HP-UX when HP supported diskless clusters where
clients, booting and running from servers, could be different
architectures (M68k and PA-RISC), but where a single view of
the network file system, compatible between the different
clients, was wanted.

They allow one name in the file system to map transparently to two or
more objects, with the choice of object determined by the 'context' of
the accessor (which could include processor type, revision, FPU presence,
and other mostly hardware-specific details, expressed as a list of
property names such as 'hppa', 'm68000', etc.).

Files that were often CDFs included /hp-ux (the HP-UX kernel at the time)
/etc/passwd, and I think also /bin and /dev. They were a complement to
links, which provide multiple file names for the same object, by
providing multiple objects for the same file name.

The implementation was via a special type of directory that contained
files named according to the named properties available in clients' contexts
(I think one could be called 'default' as well, in case there wasn't a
match for any others). Such directories were indicated by being setuid.

Various commands, such as chown, ls and find, supported the extra 'hidden'
switch -H to expose such directories as regular directories, analogously
to lchown(), etc.. You could also explicitly name the directory, rather
than the appropriate object for your context, by putting a '+' on the end
of the object name.

So, if you tried to open (say) /hp-ux, the names of the files in the directory
/hp-ux+ would be compared to the names in your context, and the first
file that matched a name in your context would *really* be opened, and
presented to you as if it were the contents of /hp-ux. But if you opened
/hp-ux+, you'd get a directory with various files with names like 'hppa',
'm68000', '68887', 'default', etc., presumably all different versions of
the HP-UX kernel suitable for the different systems on your network.

CDFs were discontinued around HP-UX 9.0 along with HP's proprietary
clustering system because of lack of support for such a feature in
general Unix standards.

-- 
Frank Wales [frank@limitless.co.uk]

- 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/