From mint-bounce@lists.fishpool.fi  Sat Aug 29 19:27:49 2009
X-Virus-Scanned: amavisd-new at demon.co.uk
Subject: Re: [MiNT] symlinks and hostfs
From: Alan Hourihane <alanh@fairlite.co.uk>
To: Vincent =?ISO-8859-1?Q?Rivi=E8re?= <vincent.riviere@freesbee.fr>
Cc: mint@lists.fishpool.fi
In-Reply-To: <4A99B3BC.7090304@freesbee.fr>
References: <4A97D65D.6090100@freesbee.fr>
	 <1251471399.19057.103.camel@jetpack.demon.co.uk>
	 <1251472068.19057.104.camel@jetpack.demon.co.uk>
	 <4A97F60C.5040903@freesbee.fr>
	 <1251473424.19057.108.camel@jetpack.demon.co.uk>
	 <4A98472E.3010505@freesbee.fr <alpine.LFD.2.00.0908290910390.8181@localhost>
	 <1251532244.3902.18.camel@joy>
	 <alpine.LFD.2.00.0908291226530.8181@localhost>
	 <1251550654.12642.71.camel@joy>
	 <alpine.LFD.2.00.0908291515370.8181@localhost>
	 <1251555169.21551.32.camel@joy>
	 <1251561900.23844.7.camel@jetpack.demon.co.uk>
	 <1251564592.4397.16.camel@joy>
	 <1251571200.23844.10.camel@jetpack.demon.co.uk>
	 <d7b569ab1d9bff163b51e81e6e588d87.squirrel@webmail.sophics.cz>
	 <1251580074.23844.15.camel@jetpack.demon.co.uk>
	 <1251583303.6084.44.camel@joy>  <4A99B3BC.7090304@freesbee.fr>
Content-Type: text/plain; charset="ISO-8859-1"
Date: Sun, 30 Aug 2009 00:26:12 +0100
Message-Id: <1251588372.31964.11.camel@jetpack.demon.co.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.24.5 
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: alanh@fairlite.co.uk
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id n7TNRn3d022055

On Sun, 2009-08-30 at 01:03 +0200, Vincent Rivière wrote:
> Petr Stehlik wrote:
> > In ARAnyM when we detect that the symlink goes beyond the mapped path I
> > think we have about three choices:
> > 
> > A) remove (hide) the symlink from guest
> 
> Bad idea. Hostfs should show a host directory as is, without 
> transforming it.

Agreed.

> > B) let it be broken
> 
> Probably the most honest solution. I believe that NFS do this - while I 
> didn't test.

Yes.

> > C) Standa's real file simulator
> 
> This is an interesting feature, could be enabled with an option.

I'd agree here.

> > Next example: normal symlink _stays_ symlink
> > 
> > 5) $ cd /tmp/afros/drive_c && ln -s olga.app samantha.prg
> > 6) in Teradesk open C: and check the samantha.prg - it's a symlink
> > (printed in italic)
> 
> No, samantha.prg looks like a regular file here.

Same here.

> > What else... let's say creating a symlink in the guest
> > 
> > 7) in Teradesk select C:\acalc.acc and click File->New, a dialog for
> > creating new symlink appears. Edit the symlink target and remove the
> > absolute path "C:\" that is not necessary there, confirm OK
> > 8) $ ls -l /tmp/afros/drive_c/ and you'll see the relative symlink. If
> > you didn't remove the absolute path in Teradesk you'd get a symlink with
> > target C:\acalc.acc - not useful on the host yet still fully working on
> > the guest.
> 
> The relative symlink Link_to_acalc.acc is created as expected on the 
> host, I can see "Link_to_acalc.acc -> acalc.acc" with "ls -l" on the 
> host. I never experienced problems with symlinks creation.
> However Link_to_acalc.acc looks like a regular file in the C:\* TeraDesk 
> window, it is wrong.
> 
> I use the official ARAnyM 0.9.8 beta on Cygwin and the official AFROS 
> 8.12. I replaced "D = /" by "D =" in the config file, this is mandatory 
> for making the bug appear.
> 
> My AFROS is located in /cygdrive/c/Vincent/afros (yours is in 
> /tmp/afros), I will try to move mine to /tmp just to be sure.
> 
> Either we don't test the exact same way, or there is a difference 
> somewhere between Linux and Cygwin.

I see the same as you Vincent.

Additionally with my patch I still see bad symlink handling being
reported, so it seems some additional work with readlink in hostfs is
also required.

Alan.


