[squeak-dev] The Trunk: System-ul.1148.mcz

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 25 08:41:44 UTC 2020


Hi Levente,


> On Mar 24, 2020, at 1:15 PM, commits at source.squeak.org wrote:
> 
> Levente Uzonyi uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-ul.1148.mcz
> 
> ==================== Summary ====================
> 
> Name: System-ul.1148
> Author: ul
> Time: 24 March 2020, 9:15:28.593463 pm
> UUID: 79bbf013-47f5-4f3c-9e42-8f169fe22a6c
> Ancestors: System-ul.1147
> 
> - create a deep copy of the keys read from the file in SecurityManager >> #loadSecurityKeys, so that they can be modified later
> 
> =============== Diff against System-ul.1147 ===============
> 
> Item was changed:
>  ----- Method: SecurityManager>>loadSecurityKeys (in category 'fileIn/out') -----
>  loadSecurityKeys
>      "SecurityManager default loadSecurityKeys"
>      "Load the keys file for the current user"
>      | fd loc file keys |
>      self isInRestrictedMode ifTrue:[^self]. "no point in even trying"
>      loc := self secureUserDirectory. "where to get it from"
>      loc last = FileDirectory pathNameDelimiter ifFalse:[
>          loc := loc copyWith: FileDirectory pathNameDelimiter.
>      ].
>      fd := FileDirectory on: loc.
>      file := [fd readOnlyFileNamed: keysFileName] 
>              on: FileDoesNotExistException do:[:ex| nil].
>      file ifNil:[^self]. "no keys file"
> +    keys := (Object readFrom: file) veryDeepCopy. "Use #veryDeepCopy to make the non-writable literal objects created by the Compiler writable."
> -    keys := Object readFrom: file.
>      privateKeyPair := keys first.
>      trustedKeys := keys last.
>      file close.!

Why not change Object class>>readFrom: to answer mutable objects?


More information about the Squeak-dev mailing list