Can't get Squeak Plugin to work under Linux

Ned Konz ned at bike-nomad.com
Sun May 6 16:09:32 UTC 2001


On Sunday 06 May 2001 06:43, Bert wrote:
> On Fri, 4 May 2001, Ned Konz wrote:
> > Trying the Squeak image that's pointed to by Squeakland.org, and using
> > the September plugin/vm from Bert, I can't run anything from
> > Squeakland.
> > This needs to be fixed. Is it the SecurityPlugin keeping
> > directoryNames blank?
>
> No. My Plugin/the Unix VM In General does not yet support the
> SecurityManager stuff. It still enables the file sandbox for the image
> directory before startup, so anything above that directory is invisible.
> Andreas for SqC suggests the VM should not enable the sandbox until
> "untrusted" content is downloaded. (See the recent "Plugin Versioning
> Woes?" thread). I'll see what I can do (although I strongly dislike
> something creating a directory outside the sandbox).

I suppose that we could get the security stuff working. It can't be that hard 
to get going.

> > And the spelling of assureExistance should be fixed, because it looks
> > embarrassing.
>
> It's too bad you can't tell the spelling from the pronounciation in
> English - which makes it rather hard for non-native speakers like me or
> the author of that method. How abut hooking a spell-checker into the
> Smalltalk compiler? ;-)

I know, it's difficult to guess how English spells things. There is a 
competition in English-speaking countries called a "spelling bee" where 
students attempt to spell progressively more difficult words. I suspect that 
there are some languages where this would make no sense at all (Spanish comes 
to mind).

This misspelling is not too important, other than that it adds another source 
of errors (if someone uses assureExistence, they won't call the right 
method). As a native speaker, I'm really glad that Squeak wasn't written in, 
say, German! 

> Much more important than fixing the spelling would be to rewrite it in a
> way so it does not depend on walking up the directory chain. There has to
> be a way to test if the directory exists ...

primitiveDirectoryLookup distinguishes between a bad/nonexistent path and a 
directory with no entries. This is the only possibility that I saw (see 
sqUnixFile.c / dir_Lookup() and FilePlugin_primitiveDirectoryLookup). If you 
asked for the first entry in the directory and didn't get a primitive 
failure, you could assume that the directory existed.

FileDirectory primLookupEntryIn:index:

should be able to distinguish between non-existent paths and empty 
directories.

FileDirectory default primLookupEntryIn: FileDirectory default pathName 
index: 1

will return #badDirectoryPath if FileDirectory default does not exist or is 
unreadable. If the directory is empty it will return nil. Otherwise, it will 
return a directory entry.

This can be used for assuring that the directory exists.

The problem with assureExistance as written is that it will also try to 
create a directory if that directory is found not to exist. I'm not sure 
that's what we want for the sandbox.

In fact (more confusing English distinctions here), assureExistance should 
probably be named "ensureExistence" because it makes sure that the directory 
exists by creating parent directories.

What we probably need in the case of the sandbox is just to make sure 
(assure) that the directory exists without trying to create it.

I don't know. What do we want to do here?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list