dalehenrich / st_launcher

cross platform smalltalk shell scripts
MIT License
5 stars 1 forks source link

Cannot run as non-SystemUser, until class loading for script classes is changed ... #5

Open dalehenrich opened 5 years ago

dalehenrich commented 5 years ago

running the about.st script as DataCurator logs in (yay! success) but produces the following when attempting to load the about.st class:

rogue:st_launcher>bin/about.st gemstone_DataCurator --
a SecurityError occurred (error 2116), An attempt was made to modify the object aRwGsLoadedSymbolDictPackage st_launcher-Scripts in objectSecurityPolicyId 1 with insufficient authorization.
rogue:st_launcher>bin/about.st gemstone_DataCurator -D --
/home/dhenrich/rogue/_homes/rogue/_home/shared/repos/st_launcher/home/platforms/gemstone/products/GemStone64Bit3.5.0-x86_64.Linux/bin/topaz -I /home/dhenrich/rogue/_homes/rogue/_home/shared/repos/st_launcher/home/images/gemstone/.topazini_DataCurator -C "GEM_SOLO_EXTENT=$ST_LAUNCHER_HOME/images/gemstone/snapshots/extent0.gemstone.dbf" -S /tmp/tmp.TRfQ7uW5CD.stash  -lq
ERROR 2116 , a SecurityError occurred (error 2116), An attempt was made to modify the object aRwGsLoadedSymbolDictPackage st_launcher-Scripts in objectSecurityPolicyId 1 with insufficient authorization. (SecurityError)
 Near line 29 of file /tmp/tmp.TRfQ7uW5CD.stash
topaz > exec iferr 1 : stk 
==> 1 SecurityError (AbstractException) >> _signalFromPrimitive: @6 line 15
2 RwGsLoadedSymbolDictPackage (RwLoadedPackage) >> markDirty @1 line 1
3 RwGsLoadedSymbolDictPackage (RwLoadedPackage) >> removeLoadedClass: @2 line 3
4 [] in RwGsPatchSet_254 >> doMoveClassesBetweenPackages @14 line 9
5 [] in Set >> do:                              @8 line 11
6 KeyValueDictionary >> keysDo:                 @20 line 18
7 Set >> do:                                    @4 line 11
8 RwGsPatchSet_254 >> doMoveClassesBetweenPackages @5 line 6
9 RwGsPatchSet_254 >> apply                     @21 line 23
10 RwGsImage class >> applyModification_254:visitorClass:instanceMigrator: @11 line 9
11 RwGsImage class >> applyModification_254:instanceMigrator: @9 line 12
12 RwPrjLoadTool >> _loadProjectSetDefinition_254:instanceMigrator: @18 line 23
13 [] in RwPrjLoadTool >> _doProjectSetLoad_254:instanceMigrator:originalProjectSet:processedClassNames: @8 line 4
14 ExecBlock0 (ExecBlock) >> on:do:              @3 line 44
15 RwPrjLoadTool >> _doProjectSetLoad_254:instanceMigrator:originalProjectSet:processedClassNames: @3 line 6
16 RwPrjLoadTool >> _doProjectSetLoad_254:instanceMigrator:originalProjectSet:processedClassNames: @4 line 35
17 RwPrjLoadTool >> loadProjectSetDefinition:instanceMigrator: @3 line 7
18 RwPrjLoadTool >> loadProjectSetDefinition:    @4 line 4
19 RwPrjLoadTool >> loadProjectDefinition:       @6 line 5
20 StashClassTool >> loadTonelClassFile:projectName:packageName:symDictName: @8 line 6
21 StLauncherScript class >> loadAndExecuteScriptClassFile:stashArgs:imageName:scriptName:workingDir:projectName:packageName:symDictName: @6 line 6
22 StLauncherScript class >> loadAndExecuteScriptClassFile:stashArgs:imageName:scriptName:workingDir: @2 line 4
23 [] in Executed Code                           @7 line 4
24 ExecBlock0 (ExecBlock) >> on:do:              @3 line 44
25 Executed Code                                 @4 line 10
26 GsNMethod class >> _gsReturnToC               @1 line 1
Stopping at line 29 of /tmp/tmp.TRfQ7uW5CD.stash

Shoulld be loading class into a private symbol dictionary ... using code I gave Allen for loading tonel class files in topaz (it'll be in image for 3.6) ...

dalehenrich commented 4 years ago

Private symbol dictionary should be done for st_launcher ... retain current functionality in stash ... stash will eventually be deprecated, but will keep the functionality alive for the time being ... if you want to edit script, load as a package

dalehenrich commented 4 years ago

... to be clear, I think that just the class should be loaded into a symbol dictionary without the extra baggage of the fake project and package ... in fact just creating the class (including methods) and not having it installed in any symbol dictionary is probably ideal ... when running the script, so that the script doesn't have any artifacts persisted on commit