primUntrustedUserDirectory trouble of new mac carbon VM

Tetsuya HAYASHI tetha at st.rim.or.jp
Thu Jan 18 10:20:06 UTC 2007


Oops, it's my misunderstanding of misunder....
The problem is still alive, I looked at another window.

I have debugged step by step,

1) global variable gSqueakUntrustedDirectoryName is set as=20
    '/Users/tetha/Library/Preferences/Internet/My Squeak'
it lacks the last delimiter char '/'.

2) ioInitSecurity() in SecurityPlugin module
    strcpy untrustedUserDirectory from gSqueakUntrustedDirectoryName
but, after this,

3) fixPath()
    this functions split the last component 'My Squeak', because =
pathname lacks the last delimiter, so it is fixed as =
'/Users/tetha/Library/Preferences/Internet'

I think this caused by stringByExpandingTildeInPath objc method, it =
chops the last delimiter.

On 2007/01/18, at 18:44, Tetsuya HAYASHI wrote:

> Sorry, it's my misunderstanding.
> I didn't set On to Preferences -> securityChecksEnabled.
> When it turns to be enabled, it works well, returns right pathname.
>
> I noticed it while tracing in debugger.
>
> On 2007/01/18, at 17:11, Tetsuya HAYASHI wrote:
>
>> Hi, John,
>>
>> On 2007/01/18, at 15:43, John M McIntosh wrote:
>>
>>> Ah, mmm a bug, but if you try =
~/Library/Preferences/Squeak/Internet/My Squeak/aaaaaaaa/  what happens?
>>
>> I've tried it, that is no problem, returns
>>   '/Users/tetha/Library/Preferences/Internet/My Squeak'=20
>>
>>> Perhaps the code (I've not looked yet) assumes the aaaaaaaa is a =
file name and then resolves to the directory?
>>>
>>> I'll note the default should be
>>> 	<key>SqueakBrowserUnTrustedDirectory</key>
>>> 	<string>~/Library/Preferences/Squeak/Internet/My =
Squeak/</string>
>>>
>>> I invoke
>>> (NSString*) stringByExpandingTildeInPath
>>>
>>> on the string, but the apple documentation is not clear, it only =
says:
>>>
>>> A new string made by expanding the initial component of the =
receiver, if it begins with =81g~=81h or =81g~user=81h, to its full path =
value.
>>> Returns a new string matching the receiver if the receiver=81fs =
initial component can=81ft be expanded.
>>
>> It's puzzling...
>> I'm going to build VM from the svn tree, and test it.
>>
>>> On Jan 17, 2007, at 6:56 PM, Tetsuya HAYASHI wrote:
>>>
>>>> Hi, all,
>>>>
>>>> About mac vm 3.8.14beta6U and 3.8.14beta7U, I have trouble.
>>>>
>>>>   SecurityManager default primUntrustedUserDirectory
>>>>
>>>> returns a path name,
>>>>
>>>>   '/Users/tetha/Library/Preferences/Internet'
>>>>
>>>> But, I believe it should have 'My Squeak' as the last path =
component.
>>>> When I setup the value of SqueakBrowserUnTrustedDirectory entry in =
Info.plist as
>>>>
>>>>   ~/Library/Preferences/Squeak/Internet/My Squeak/aaaaaaaa
>>>>
>>>> (add a dummy component aaaaaaaa)
>>>> then returns
>>>>
>>>>     '/Users/tetha/Library/Preferences/Internet/My Squeak'
>>>>
>>>> I use MacOSX 10.4.8 on PPC box.
>>>>
>>>> Best regards,
>>>> --
>>>> Tetsuya HAYASHI <tetha at st.rim.or.jp>, <tetha at mac.com>
>>>>
>>>>
>>>
>>> --
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

>>> John M. McIntosh <johnmci at smalltalkconsulting.com>
>>> Corporate Smalltalk Consulting Ltd.  =
http://www.smalltalkconsulting.com
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Tetsuya HAYASHI <tetha at st.rim.or.jp>, <tetha at mac.com>
>>
>>
>>
>>
>>
>
>
>
>
>




More information about the Squeak-dev mailing list