Re: how mkdir without .. ?

1999-10-18 Thread Brian Beattie

On Mon, 18 Oct 1999, Aleksandr A.Babaylov wrote:

 
 I remember, that in really old UNIXes creating a dirertory
 and populating it with "." and ".." entryes was different
 steps, but I dont remember method (I was young and dumb then)

the mkdir command was something along the lines of:

main( argc, argv )
{
...
chdir(parentdir);
mknod("foo",I_DIR|modes);
link("foo", ".");
link(".","..");
...
}

This was on a version 7, or system V, filesystem.

It is no longer possible to use mknod to make a directory inode.  The
rasson for this is that some filesystems can not be made to support the
old semantics, and it is a good idea to have an atomic method to make a
directory.

 -- 
 @BABOLO  http://links.ru/
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message
 

Brian Beattie| The only problem with
[EMAIL PROTECTED]  | winning the rat race ...
www.aracnet.com/~beattie | in the end you're still a rat



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: how mkdir without .. ?

1999-10-16 Thread Doug

"Aleksandr A.Babaylov" wrote:
 
 I need in directories without link to parent in it
 or with link to parent renamed to something exotic name.

What are you trying to accomplish? If you are trying to create
directories that users cannot "escape" out of, all you need to do is
remove the world rx permissions on the parent directory, and make sure
that they don't have access via the group permissions. You might also
want to look at chroot. 

Good luck,

Doug
-- 
"Stop it, I'm gettin' misty." 

- Mel Gibson as Porter, "Payback"


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



how mkdir without .. ?

1999-10-15 Thread Aleksandr A.Babaylov


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 ?

-- 
@BABOLO  http://links.ru/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message