SUID directories -- security concern?

Shankar Unni shankar at hpclisp.HP.COM
Thu Feb 22 09:11:54 AEST 1990


> As an interesting note under HP-UX 7.0 . . .
>  
> If you make a directory, then do "chmod +s mydir", you make the directory
> disappear.  Its inode is still in use, but there is no way to access the
> directory.  I assume that its entry in the parent directory is somehow
> corrupted, as I can make as many directories with the same name as I wish.
>  
> Any ideas why this might happen (addressed more-or-less specifically to
> HP-UX support types at HP)?

Yes, the directory gets changed to a "context-dependent file".

(Context-dependent files are used for diskless clusters on HP-UX - the
"context" is, for example, a hostname of a client, or generic designators
like "remoteroot").

For example:

    % ll
    total 2
    drwxrwxr-x   2 shankar  c++           24 Feb 21 13:59 JUNK
    
    % chmod +s JUNK
    % ll
    total 0
    
    % ll -H      (show CDF's)
    total 2
    Hrwsrwsr-x   2 shankar  c++           24 Feb 21 13:59 JUNK+
    
Since there are no context entries inside this CDF, it becomes invisible.

To "get it back", try:

    % chmod -s JUNK+
    % ll
    total 2
    drwxrwxr-x   2 shankar  c++           24 Feb 21 13:59 JUNK

-----
Shankar Unni                                   E-Mail: 
Hewlett-Packard California Language Lab.     Internet: shankar at hpda.hp.com
Phone : (408) 447-5797                           UUCP: ...!hplabs!hpda!shankar

DISCLAIMER:
This response does not represent the official position of, or statement by,
the Hewlett-Packard Company.  The above data is provided for informational
purposes only.  It is supplied without warranty of any kind.



More information about the Comp.unix.wizards mailing list