'From Squeak3.3alpha of 15 February 2002 [latest update: #4981] on 15 October 2002 at 2:44:12 pm'! "Change Set: Password-tk Date: 15 October 2002 Author: Ted Kaehler ServerDirectories have the capability to store passwords in a local file. Currently it looks for the vmPath's directory for that file. With the arrival of bundled Mac vms, that folder in part of the bundle. This update adds the imagePath and the default directory as other places to look. Also adds the vmPath's enclosing folder."! !FileDirectory class methodsFor: 'create/delete file' stamp: 'tk 10/15/2002 14:34'! lookInUsualPlaces: fileName "Check the default directory, the imagePath, and the vmPath (and the vmPath's owner) for this file." | vmp | (FileDirectory default fileExists: fileName) ifTrue: [^ FileDirectory default fileNamed: fileName]. ((vmp _ FileDirectory on: Smalltalk imagePath) fileExists: fileName) ifTrue: [^ vmp fileNamed: fileName]. ((vmp _ FileDirectory on: Smalltalk vmPath) fileExists: fileName) ifTrue: [^ vmp fileNamed: fileName]. ((vmp _ vmp containingDirectory) fileExists: fileName) ifTrue: [^ vmp fileNamed: fileName]. ^ nil! ! !Password methodsFor: 'as yet unclassified' stamp: 'tk 10/15/2002 14:39'! serverPasswords "Get the server passwords off the disk and decode them. The file 'sqk.info' must be in some folder that Squeak thinks is special (vm folder, or default directory). (Note: This code works even if you are running with no system sources file.)" | sfile | (sfile _ FileDirectory lookInUsualPlaces: 'sqk.info') ifNil: [^ nil]. "If not there, Caller will ask user for password" "If you don't have this file, and you really do want to release an update, contact Ted Kaehler." ^ (self decode: (sfile contentsOfEntireFile)) findTokens: String cr ! !