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
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 johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On 10 October 2010 07:26, John M McIntosh johnmci@smalltalkconsulting.com 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
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 johnmci@smalltalkconsulting.com 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 johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On Sun, Oct 10, 2010 at 12:18 PM, John M McIntosh < johnmci@smalltalkconsulting.com> 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 johnmci@smalltalkconsulting.com 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 johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
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 johnmci@smalltalkconsulting.com 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 johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
vm-dev@lists.squeakfoundation.org