[Squeakland] Strange error when loading a project into another from a superwiki then saving the image

Bert Freudenberg bert at freudenbergs.de
Fri Mar 2 15:20:41 PST 2007


I think I know what's going on.

Loading a project from the net is inherently unsafe, so before  
actually entering the project, we enable sandbox mode. Otherwise any  
foreign project might wipe out your whole disk.

The debug log you attached before shows that your image was in  
restricted mode. In this sandbox mode, you are only allowed to write  
inside the SecurityManager's "untrusted directory". I don't think  
you're even supposed to save the image when in sandbox mode, so if  
you try anyway, there might be any number of bugs lurking. IIRC the  
image save logic assumes that FileDirectory default and the image  
directory are identical. But in sandbox mode, this is not true anymore.

- Bert -

On Mar 2, 2007, at 21:21 , Hilaire Fernandes wrote:

> Recheck again at home and I can reproduce the same problem.
>
> Load from swiki a project then save image under a different name, so:
>
> Smalltlalk>>saveImageinFileName:t1
> t1='/home/hilaire/.npsqueak/My Squeak/SqueakPlugin.1.image'
>
> Then the recursive call of 'assureExistenceOfPath: t1' go up to home,
> then the call primCreateDirectory t1 with t1='/home'
> It is then primitive land, which I don't know
>
> I will look at the OLPC version.
>
> Hilaire
>
>
>
> Hilaire Fernandes a écrit :
>> Bert Freudenberg a écrit :
>>> No, what I mean is, what directory was it trying to create  
>>> originally.
>>> You have to look in the debugger stack where the first  
>>> assureExistence
>>> is called to see that directory.
>>
>> Strangely it was not clear as I did not see any absolute pathname,  
>> only
>> successive directory. However it was looking like it starts down from
>> 'My Squeak' folder. I will give it a serious check later next week  
>> as I
>> was in hurry recently.
>>
>> Hilaire
>>
>>
>>> - Bert -
>>>
>>>
>>> On Mar 2, 2007, at 12:41 , Hilaire Fernandes wrote:
>>>
>>>> Sure, it is trying to create the /home directory, odd don't you? At
>>>> first I was wondering if I was analysing correcty.
>>>>
>>>> I load a .pr which does not produce this problem.
>>>> Form superwiki ofset.org:8000
>>>>
>>>> - the pb arised with 'v-toys voiture sur route-7.pr'
>>>> - the does not arise with 'modele de diapo inter-2'
>>>>
>>>> Both project are at top of the list.
>>>>
>>>> Does it produce the same pb for you?
>>>>
>>>> Hilaire
>>>>
>>>> Bert Freudenberg a écrit :
>>>>> Okay, so you can reproduce this. In the debugger, can you check  
>>>>> which
>>>>> directory it's actually trying to ensure exists? And find out why
>>>>> that fails?
>>>>







More information about the Squeakland mailing list