'From Squeak3.1alpha of 4 February 2001 [latest update: #3540] on 7 February 2001 at 12:44:02 pm'! "Change Set: SysStartup-ar Date: 7 February 2001 Author: Andreas Raab Make #readDocumentFile go through the security manager. Remove directory creation when loading keys."! !SecurityManager methodsFor: 'fileIn/out' stamp: 'ar 2/7/2001 12:39'! 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| ex resume: nil]. file ifNil:[^self]. "no keys file" keys _ Object readFrom: file. privateKeyPair _ keys first. trustedKeys _ keys last. file close.! ! !SecurityManager methodsFor: 'security operations' stamp: 'ar 2/7/2001 12:41'! fileInObjectAndCode: aStream | trusted | trusted _ self positionToSecureContentsOf: aStream. trusted ifFalse:[self enterRestrictedMode ifFalse:[ (aStream respondsTo: #close) ifTrue:[aStream close]. ^nil]]. ^aStream fileInObjectAndCode! ! !SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 2/7/2001 12:41'! readDocumentFile "Process system updates. Read a document file, if one was provided. Start application." | fileName object | StartupStamp _ '----STARTUP----', Time dateAndTimeNow printString, ' as ', Smalltalk imageName. self processUpdates. (Preferences valueOfFlag: #readDocumentAtStartup) ifFalse: [^ self]. fileName _ Smalltalk getSystemAttribute: 2. ((fileName ~~ nil) and: [fileName size > 0]) ifTrue: [ (fileName asLowercase beginsWith: 'http://') ifTrue: [ "fetch remote file" HTTPSocket httpFileIn: fileName] ifFalse: [ "read local file" object _ SecurityManager default fileInObjectAndCode: (FileStream readOnlyFileNamed: fileName). "if launching a .sqo document, send open to the final object" (fileName endsWith: '.sqo') ifTrue: [object open]]] ifFalse: [ (Preferences valueOfFlag: #startImagineeringStudio) ifTrue: [ScriptingSystem openImagineeringStudio]]! !