[lkml]   [2005]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RCF] [PATCH] unprivileged mount/umount
> r u sure, this program works?

Yes :)

> Sorry if I am saying something dumb here.
> Correct me. When a file descriptor is sent from one process to other,
> arn't they referring to different files in each of the processes.
> fd=5 may be pointing to file 'xyz' in parent process,
> where as fd=5 will be pointing to 'abc' in the child process.

See 'man 7 unix' SCM_RIGHTS.

How do you know the program did not work?

Note: the program starts a new shell, it doesn't exit! Do this in the
started shell (do not 'cd' before it):

ls tmp/clonetest/mnt
ls /tmp/clonetest/mnt

If you see different things, then the program worked.

It's not such a magic thing. You can also do something similar for
example by:

shell1> mount --bind / /tmp/mnt
shell1> cd /tmp/mnt
sheel2> umount -l /tmp/mnt

Now shell1 sees two separate "namespaces" in in CWD and /

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-05-13 08:10    [W:0.084 / U:34.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site