Mac VM: SecurityManager default untrustedUserDirectory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac VM: SecurityManager default untrustedUserDirectory

Lukas Renggli
 
Depending on the VM version evaluating

   SecurityManager default untrustedUserDirectory

gives inconsistent results:

   4.2.5beta1U: '/Users/renggli/Library/Preferences/Squeak/Internet/My
Squeak' (ok)
   5.8b10: '/foobar/tooBar/forSqueak/bogus/' (strange)

Looks like there is something missing in for 5.8b10?

This makes certain tests of the Filesystem library fail.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
Reply | Threaded
Open this post in threaded view
|

Re: Mac VM: SecurityManager default untrustedUserDirectory

johnmci
 
4.2.5x   SqueakUnTrustedDirectory ->  ~/Library/Preferences/Squeak/Internet/My Squeak/

5.8.x    SqueakUnTrustedDirectory -> /foobar/tooBar/forSqueak/bogus/

What would you like it to be?


On 2010-10-09, at 11:10 AM, Lukas Renggli wrote:

>
> Depending on the VM version evaluating
>
>   SecurityManager default untrustedUserDirectory
>
> gives inconsistent results:
>
>   4.2.5beta1U: '/Users/renggli/Library/Preferences/Squeak/Internet/My
> Squeak' (ok)
>   5.8b10: '/foobar/tooBar/forSqueak/bogus/' (strange)
>
> Looks like there is something missing in for 5.8b10?
>
> This makes certain tests of the Filesystem library fail.
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac VM: SecurityManager default untrustedUserDirectory

Lukas Renggli

On 10 October 2010 07:26, John M McIntosh
<[hidden email]> wrote:
>
> 4.2.5x   SqueakUnTrustedDirectory ->  ~/Library/Preferences/Squeak/Internet/My Squeak/
>
> 5.8.x    SqueakUnTrustedDirectory -> /foobar/tooBar/forSqueak/bogus/
>
> What would you like it to be?

'/foobar/tooBar/forSqueak/bogus/' doesn't look meaningful, it doesn't
even exist on my system.

The Filesystem library uses #untrustedUserDirectory this to find the
home directory. Maybe there is a better way to do that on Mac?

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
Reply | Threaded
Open this post in threaded view
|

Re: Mac VM: SecurityManager default untrustedUserDirectory

johnmci
 
Asking for the home directory should invoke a platform specific method that does the right thing.
Perhaps on unix based machines you can use ~  ?  However on systems that have file security turned on then you
might need to lookup the squeak un trusted directory since the answer could be different.


On 2010-10-10, at 11:39 AM, Lukas Renggli wrote:

>
> On 10 October 2010 07:26, John M McIntosh
> <[hidden email]> wrote:
>>
>> 4.2.5x   SqueakUnTrustedDirectory ->  ~/Library/Preferences/Squeak/Internet/My Squeak/
>>
>> 5.8.x    SqueakUnTrustedDirectory -> /foobar/tooBar/forSqueak/bogus/
>>
>> What would you like it to be?
>
> '/foobar/tooBar/forSqueak/bogus/' doesn't look meaningful, it doesn't
> even exist on my system.
>
> The Filesystem library uses #untrustedUserDirectory this to find the
> home directory. Maybe there is a better way to do that on Mac?
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac VM: SecurityManager default untrustedUserDirectory

Eliot Miranda-2
 


On Sun, Oct 10, 2010 at 12:18 PM, John M McIntosh <[hidden email]> wrote:
 
Asking for the home directory should invoke a platform specific method that does the right thing.
Perhaps on unix based machines you can use ~  ?

Surely you use getenv("HOME") right?  ~ is an abbreviation implemented in the shell.  It is not meaningful to system calls; i.e. open("~",0) attempts to open a file called "~" in the current directory, /not/ /Users/me.
 
 However on systems that have file security turned on then you
might need to lookup the squeak un trusted directory since the answer could be different.


On 2010-10-10, at 11:39 AM, Lukas Renggli wrote:

>
> On 10 October 2010 07:26, John M McIntosh
> <[hidden email]> wrote:
>>
>> 4.2.5x   SqueakUnTrustedDirectory ->  ~/Library/Preferences/Squeak/Internet/My Squeak/
>>
>> 5.8.x    SqueakUnTrustedDirectory -> /foobar/tooBar/forSqueak/bogus/
>>
>> What would you like it to be?
>
> '/foobar/tooBar/forSqueak/bogus/' doesn't look meaningful, it doesn't
> even exist on my system.
>
> The Filesystem library uses #untrustedUserDirectory this to find the
> home directory. Maybe there is a better way to do that on Mac?
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================






Reply | Threaded
Open this post in threaded view
|

Re: Mac VM: SecurityManager default untrustedUserDirectory

Bert Freudenberg
In reply to this post by johnmci

IMHO good defaults would be

SqueakUnTrustedDirectory
        ~/Documents/Squeak/

SqueakTrustedDirectory
        ~/Library/Application Support/Squeak/

(these are settings in Info.plist in case you were not aware)

IMHO for getting the home directory there should be a new FilePlugin primitive. You could use FFI or possibly OSProcess in the mean time.

- Bert -

On 10.10.2010, at 12:18, John M McIntosh wrote:

> Asking for the home directory should invoke a platform specific method that does the right thing.
> Perhaps on unix based machines you can use ~  ?  However on systems that have file security turned on then you
> might need to lookup the squeak un trusted directory since the answer could be different.
>
>
> On 2010-10-10, at 11:39 AM, Lukas Renggli wrote:
>
>>
>> On 10 October 2010 07:26, John M McIntosh
>> <[hidden email]> wrote:
>>>
>>> 4.2.5x   SqueakUnTrustedDirectory ->  ~/Library/Preferences/Squeak/Internet/My Squeak/
>>>
>>> 5.8.x    SqueakUnTrustedDirectory -> /foobar/tooBar/forSqueak/bogus/
>>>
>>> What would you like it to be?
>>
>> '/foobar/tooBar/forSqueak/bogus/' doesn't look meaningful, it doesn't
>> even exist on my system.
>>
>> The Filesystem library uses #untrustedUserDirectory this to find the
>> home directory. Maybe there is a better way to do that on Mac?
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>