Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008618opensim[REGION] Script Functionspublic2019-10-26 13:342019-10-28 13:59
ReporterKayaker Magic 
Assigned To 
PlatformAllOSMaster Snail DevOS Version0.9.1
Product Version 
Target VersionFixed in Version 
Summary0008618: New OSSL function to return permission test for named function
DescriptionPatch file to implement this is attached.
This is the minimalist way I can find to add an OSSL function that can tell a script if it is allowed to call an OSSL function by name.
If OSSL functions are disabled, it quietly returns 0 (false).
It uses the internal private function CheckThreatLevelTest to see if a function is allowed by the [OSSL] section in the INI files and returns 1 (true) if allowed, 0 (false) if not.
If a function does not have an Allow line in the INI files, this function returns FALSE(0) because no OSSL function may know the threat level of another function. This may be a false negative but is acceptable since nobody is going to call this new function to check permission on the innocuous functions like osApproxEquals, etc.
Additional InformationDocumentation:
integer osPermissionToCall(string function)
Returns 0 (false) if you may not call the named OSSL function
Returns 1 (true) if you can call the named function
Threat Level This function does not do a threat level check
Permission Use of this function is always allowed by default
Delay 0 seconds
Quietly returns 0 (false) if all OSSL functions are disabled
        if (osPermissionToCall(“osGetGridName”))
            llOwnerSay(“You are on grid “+osGetGridName());
            llOwnersSay(“I can't tell what grid you are on”);
TagsNo tags attached.
Git Revision or version number6781000215897a0376898514a81cc4347f253403
Run Mode Grid (1 Region per Sim)
Physics EngineubODE
Script Engine
Mono Versiontrunk
Attached Filespatch file icon osPTC.patch [^] (3,392 bytes) 2019-10-26 13:34 [Show Content]

- Relationships

-  Notes
tampa (reporter)
2019-10-28 09:03

What would one do with that information? Most os functions specifically extend ll functions or provide completely new functionality not easily obtained by ll functions. Granted the error is somewhat intrusive when it happens, but that's easily solved by proper permissions set in the ini and restarting a region, which you otherwise have to do anyways to resolve it ultimately, so I don't see what this function would add that isn't already present.
Kayaker Magic (reporter)
2019-10-28 13:59

What would we do with that information? Write professional LSL scripts that check some functions before calling them when they would generate error messages. Most people who run LSL scripts are users or visitors to regions. These users do not have the ability to “solve” problems by editing the ini files and restarting the regions they visit. As a programmer who writes code for these users, I want to write scripts that detect errors before they happen and give polite, easy to understand reasons why my code cannot work here now. Or to use alternate ways to get a similar result. This function will give people like me the ability to do that.

- Issue History
Date Modified Username Field Change
2019-10-26 13:34 Kayaker Magic New Issue
2019-10-26 13:34 Kayaker Magic File Added: osPTC.patch
2019-10-26 14:15 Kayaker Magic Git Revision or version number => 6781000215897a0376898514a81cc4347f253403
2019-10-28 09:03 tampa Note Added: 0035790
2019-10-28 13:59 Kayaker Magic Note Added: 0035793

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker