[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] symlinks and hostfs



On Fri, 2009-08-28 at 17:21 +0200, Vincent Rivière wrote:
> Thanks for your efforts, Alan.
> 
> But I'm still a bit annoyed...
> 
> > int32 HostFs::host_stat64( XfsCookie *fc, const char *fpathName,
> > struct stat *statBuf ) {
> 
> Basically you changed the behaviour of that function from stat() to
> lstat(), according to its name it may not be a good thing, because it is
> certainly called from other places.

Indeed. I'm not sure what the implications are for the rest of aranym,
but it's clearly a bug in that code. I'm not sure why symlinks should
get special treatment and it's clearly wrong.

> What really annoys me is the following:
> 
> > The implementation of Fxattr() is here inside sys_f_xattr():
> >http://sparemint.atariforge.net/cgi-bin/cvsweb/freemint/sys/dosdir.c?rev=1.27.2.2&content-type=text/x-cvsweb-markup 
> >
> > And unfortunately the parameter "flag" set to 1 indicating that the
> > attributes of the symlink itself should be read is ignored :-(
> 
> That parameter "flag" indicates if sys_f_xattr() should behave as stat()
> or lstat(), but it is ignored inside the function... so ARAnyM is always
> asked to do a stat(), and it does it well.

It doesn't ignore it. The initial call to path2cookie() does the real
work and operates on the "flag". Then it passes the actual details to
the filesystem call. So aranym is never asked to do a stat() directly,
it's just emulating what it thinks it should do.

Alan.