From owner-freebsd-hackers Mon Oct 18 6:31: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id 588A814F85 for ; Mon, 18 Oct 1999 06:30:55 -0700 (PDT) (envelope-from babolo@links.ru) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id RAA09599; Mon, 18 Oct 1999 17:31:40 +0400 (MSD) Message-Id: <199910181331.RAA09599@aaz.links.ru> Subject: Re: how mkdir without .. ? In-Reply-To: <199910171836.MAA04529@harmony.village.org> from "Warner Losh" at "Oct 17, 99 12:36:48 pm" To: imp@village.org (Warner Losh) Date: Mon, 18 Oct 1999 17:31:40 +0400 (MSD) Cc: freebsd-hackers@FreeBSD.ORG From: "Aleksandr A.Babaylov" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh writes: > In message <199910151324.RAA22353@aaz.links.ru> "Aleksandr A.Babaylov" writes: > : I need in directories without link to parent in it > : or with link to parent renamed to something exotic name. > : > : What is the method to do it without kernel patching > : in FreeBSD 2.2.X or 3.X ? > > I don't think this is possible. Even / has a parent directory > (/.. being the only loop in the directory graph allowed). > > If you want to create a process that has no working directory, you can > do this by, for example, > mkdir("/tmp/foo"); > chdir("/tmp/foo"); > rmdir("/tmp/foo"); > which will make it impossible to create files in dot (./). This can > cause other problems as many programs assume they can walk up to > root. It must be possible to create files in ".", "..", "../.." so on in my task, but I don't want ".." be the path to parent directory. -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message