Article View: net.bugs
Article #170Re: XENIX 1.3 and usr/spool - (nf)
From: Mark Brukhartz
Date: Sun, 15 Jan 1984 01:03
Date: Sun, 15 Jan 1984 01:03
36 lines
1874 bytes
1874 bytes
> Now for the problem : I have found an extremely large file nested within
> the usr/spool directory. This file seems to be nothing more than a
> directory within a directory within a directory, ad infinitum.
> It goes like this ...
>
> /usr/spool/lpd
> /usr/spool/lpd/lfa00047
> /usr/spool/lpd/lfa00047/spool
> /usr/spool/lpd/lfa00047/spool/lpd
> /usr/spool/lpd/lfa00047/spool/lpd/lfa00047
> .
> .
> .
You have a link from /usr/spool/lpd/lfa00047/spool back to /usr/spool. The
easiest way to fix this is with the trivial program:
main()
{
unlink("/usr/spool/lpd/lfa00047/spool");
exit(0);
}
This will break the link (leaving /usr/spool otherwise intact). I suggest
running fsck (or icheck and dcheck) to check the filesystem after the fix.
While Unix does prohibit random links to directories, this restriction is
enforced outside of the kernel. Only the super-user is allowed to create,
remove and link directories. Mkdir(1) and rmdir(1) are set-user-id to root.
After making a truly empty directory with mknod(2), mkdir(1) creates links
to itself and its parent directory ("." and "..", respectively). This way,
the kernel does not know that "." and ".." are at all special (except for
an obscure chroot(2) kludge).
Mark Brukhartz
{allegra,ihnp4,ittral,trsvax}!laidbak!mark
Technical Details
Message-ID:
<194@laidbak.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!ihnp4!laidbak!markReferences:
<4902@uiucdcs.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site laidbak.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!ihnp4!laidbak!mark From: mark@laidbak.UUCP (Mark Brukhartz) Newsgroups: net.bugs Subject: Re: XENIX 1.3 and usr/spool - (nf) Message-ID: <194@laidbak.UUCP> Date: Sat, 14-Jan-84 20:03:46 EST Article-I.D.: laidbak.194 Posted: Sat Jan 14 20:03:46 1984 Date-Received: Mon, 16-Jan-84 05:12:41 EST References: <4902@uiucdcs.UUCP> Organization: LAI, Westmont, IL Lines: 36