On Mon, 7 Jun 2010, Julian Gilbey wrote:
> On Mon, Jun 07, 2010 at 01:07:37PM +0200, Miklos Szeredi wrote:
> > On Fri, 04 Jun 2010, Julian Gilbey wrote:
> > > The source of the problem appears to be in util/fusermount.c, lines
> > > 599-605, where a check is performed to determine whether the current
> > > directory (".") is readable. It is not at all clear to me why this
> > > should be necessary, as we are about to chdir to the mount point
> > > anyway.
> >
> > It's not clear whether this is needed or not. If you look at
> > mount_fuse() the original CWD is restored after do_mount() and before
> > add_mount().
> >
> > Currently add_mount() is called with the original working directory.
> > If we didn't open the current directory then restoring it would not be
> > possible.
>
> I'm unclear why the current directory needs to be restored. After
> calling do_mount(), the current directory is restored, then there are
> a few cleanups and the program exits. Nothing is done in the current
> directory.
add_mount() is called after do_mount(). This will execute /bin/mount
to add an entry to /etc/mtab. This will be called with an absolute
path, so it should work with any CWD but it needs some careful thoght
to make sure it's OK in every respect.
Thanks,
Miklos
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]