Date: Mon, 18 Oct 1999 17:31:40 +0400 (MSD) From: "Aleksandr A.Babaylov" <babolo@links.ru> To: imp@village.org (Warner Losh) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: how mkdir without .. ? Message-ID: <199910181331.RAA09599@aaz.links.ru> In-Reply-To: <199910171836.MAA04529@harmony.village.org> from "Warner Losh" at "Oct 17, 99 12:36:48 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910181331.RAA09599>