[Pharo-project] SecurityManager

Stéphane Ducasse stephane.ducasse at inria.fr
Thu Oct 28 11:53:04 EDT 2010


No idea :)

And indeed we should reevaluate that kind of code.

Stef

> Hello,
> 
> I found strage behavior around SecurityManager.
> 
> First, why security manager loads some secury keys at system start up?
> 
> SecurityManager>>startUp
>     "Attempt to load existing keys"
>     self loadSecurityKeys.
>     (privateKeyPair == nil 
>         and:[self isInRestrictedMode not
>         and:[self automaticKeyGeneration]]) ifTrue:[
>             self generateKeyPairInBackground.
>     ].
> 
> Second, I found bug (maybe)
> 
> When I on WindowsXP under user with russion name SecurityManager>>loadSecurityKeys failed. 
> Reason is SecurityManager>>primSecureUserDirectory returns abracadabra system path. I inspect it. It is not utf string, It is CP1251 encoded string.
> And when I change method to not encode pathname
> 
> secureUserDirectory
>     "SecurityManager default secureUserDirectory"
>     | dir |
>     dir := self primSecureUserDirectory.
>     ^ dir
>         ifNil: [FileDirectory default pathName]
>         ifNotNil: [(FilePath pathName: dir isEncoded: true) asSqueakPathName]
> 
> to 
> 
> secureUserDirectory
>     "SecurityManager default secureUserDirectory"
>     | dir |
>     dir := self primSecureUserDirectory.
>     ^ dir
>         ifNil: [FileDirectory default pathName]
>         ifNotNil: [(FilePath pathName: dir isEncoded: false) asSqueakPathName]
> 
> System started without failures.
> 
> What I corrupt in system behavior with this changes?
> 
> And most interesting question. Why all this SecurityManager stuff needed for system start up process?
> 
> Best regards,
> Denis
> 
> 
> 





More information about the Pharo-dev mailing list