[Vm-dev] Unix VM alias resolving bug

Eliot Miranda eliot.miranda at gmail.com
Thu Jun 24 17:49:46 UTC 2010


On Thu, Jun 24, 2010 at 10:33 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

>
>
> On 24.06.2010, at 19:30, Henrik Johansen wrote:
>
> >
> > There's a bug in the alias resolution sqGetFilenameFromString in
> sqUnixMain.c
> >
> > In the line
> > filenameLength = readLink(aCharBuffer, aCharBuffer, MAXPATHLEN)
> > It replaces the old link path with the resolved link path, however links
> may be relative, eg. /bin/sh linking to bash rather than /bin/bash.
> >
> > Thus, file opening, and other operations using this function will fail if
> encountering a relative link.
> >
> > F.ex. print (on Ubuntu, where sh -> dash):
> >
> > |openedRelative|
> > openedRelative := nil.
> > [FileStream readOnlyFileNamed: '/bin/sh' do: [:fs | openedRelative :=
> true]] on: FileDoesNotExistException do: [openedRelative := false].
> > openedRelative
> >
> > and you get false.
> >
> > Cheers,
> > Henry
>
> Yeah I've been bitten by that too. Do you have a patch? Actually, Ian
> prefers to be sent a fully patched file ...
>

You'll find its fixed in the Cog sources.  Alas there are other changes
there-in, but at least that function is not affected by other changes.


>
> - Bert -
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100624/f3d990ac/attachment.htm


More information about the Vm-dev mailing list