SecurityManager Class Reference

#include <SecurityManager.hpp>

Inheritance diagram for SecurityManager:
[legend]

Public Member Functions

void * operator new (size_t, void *ptr)
 
void operator delete (void *, void *)
 
void * operator new (size_t)
 
void operator delete (void *)
 
 SecurityManager (RexxObject *m)
 
 SecurityManager (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
RexxObjectcheckLocalAccess (RexxString *index)
 
RexxObjectcheckEnvironmentAccess (RexxString *index)
 
bool checkProtectedMethod (RexxObject *target, RexxString *messageName, size_t count, size_t named_count, RexxObject **arguments, ProtectedObject &result)
 
bool checkFunctionCall (RexxString *functionName, size_t count, size_t named_count, RexxObject **arguments, ProtectedObject &result)
 
bool checkCommand (RexxActivity *, RexxString *address, RexxString *command, ProtectedObject &result, ProtectedObject &condition)
 
RexxObjectcheckStreamAccess (RexxString *name)
 
RexxStringcheckRequiresAccess (RexxString *name, RexxObject *&securityManager)
 
bool isManaged ()
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
void setInRexxPackage ()
 
bool isInRexxPackage ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
virtual RexxObjectcopy ()
 
virtual RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
virtual void uninit ()
 
virtual HashCode hash ()
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
virtual bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
virtual RexxStringmakeString ()
 
virtual RexxTextmakeText ()
 
virtual void copyIntoTail (RexxCompoundTail *buffer)
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxTextprimitiveMakeText ()
 
virtual RexxArraymakeArray ()
 
virtual RexxStringstringValue ()
 
virtual RexxTexttextValue ()
 
virtual RexxIntegerintegerValue (size_t)
 
virtual bool numberValue (wholenumber_t &result, size_t precision)
 
virtual bool numberValue (wholenumber_t &result)
 
virtual bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
virtual bool unsignedNumberValue (stringsize_t &result)
 
virtual bool doubleValue (double &result)
 
virtual RexxNumberStringnumberString ()
 
virtual bool isEqual (RexxObject *)
 
virtual bool isInstanceOf (RexxClass *)
 
virtual RexxMethodinstanceMethod (RexxString *)
 
virtual RexxSupplierinstanceMethods (RexxClass *)
 
virtual RexxObjectdynamicTarget (RexxObject **arguments, size_t count, size_t named_count)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual void flatten (RexxEnvelope *)
 
virtual RexxObjectunflatten (RexxEnvelope *)
 

Protected Member Functions

bool callSecurityManager (RexxString *methodName, RexxDirectory *arguments)
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Protected Attributes

RexxObjectmanager
 
bool supportCall
 
bool supportCommand
 
bool supportEnvironment
 
bool supportLocal
 
bool supportMethod
 
bool supportRequires
 
bool supportStream
 

Additional Inherited Members

- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 
- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 

Detailed Description

Definition at line 52 of file SecurityManager.hpp.

Constructor & Destructor Documentation

◆ SecurityManager() [1/2]

◆ SecurityManager() [2/2]

SecurityManager::SecurityManager ( RESTORETYPE  restoreType)
inline

Definition at line 61 of file SecurityManager.hpp.

Member Function Documentation

◆ callSecurityManager()

bool SecurityManager::callSecurityManager ( RexxString methodName,
RexxDirectory arguments 
)
protected

Do the actual invocation of the security manager.

Parameters
methodNameThe method name to invoke.
argumentsThe arguments to the specific method.
Returns
true if the security manager overrode this, false otherwise.

Definition at line 168 of file SecurityManager.cpp.

References Error_Logical_value_authorization, Error_No_result_object_message, manager, OREF_NULL, reportException(), RexxObject::sendMessage(), and RexxObject::truthValue().

Referenced by checkCommand(), checkEnvironmentAccess(), checkFunctionCall(), checkLocalAccess(), checkProtectedMethod(), checkRequiresAccess(), and checkStreamAccess().

◆ checkCommand()

bool SecurityManager::checkCommand ( RexxActivity activity,
RexxString address,
RexxString command,
ProtectedObject result,
ProtectedObject condition 
)

Check for permission to call an external command

Parameters
activityThe activity we're running on
address
command
resultThe returned result.
condition
Returns
true if the security manager handled this call, false otherwise.

Definition at line 270 of file SecurityManager.cpp.

References callSecurityManager(), RexxActivity::createConditionObject(), RexxDirectory::fastAt(), IntegerZero, manager, new_directory(), OREF_NULL, RexxDirectory::put(), and supportCommand.

Referenced by RexxActivity::callCommandExit().

◆ checkEnvironmentAccess()

RexxObject * SecurityManager::checkEnvironmentAccess ( RexxString index)

Do a security manager check for access to the global environment.

Parameters
indexThe name of the index.
Returns
A replacement object from the security manager.

Definition at line 139 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), supportEnvironment, and TheNilObject.

Referenced by RexxSource::findClass().

◆ checkFunctionCall()

bool SecurityManager::checkFunctionCall ( RexxString functionName,
size_t  count,
size_t  named_count,
RexxObject **  arguments,
ProtectedObject result 
)

Check for permission to call an external function.

Parameters
functionNameThe name of the target function.
countThe return count.
argumentsThe method arguments.
resultThe returned result.
Returns
true if the security manager handled this call, false otherwise.

Definition at line 232 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), and supportCall.

Referenced by RexxActivity::callObjectFunctionExit().

◆ checkLocalAccess()

RexxObject * SecurityManager::checkLocalAccess ( RexxString index)

Do a security manager check for access to the local environment.

Parameters
indexThe name of the index.
Returns
A replacement object from the security manager.

Definition at line 110 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), supportLocal, and TheNilObject.

Referenced by RexxDirectory::atRexx(), and RexxSource::findClass().

◆ checkProtectedMethod()

bool SecurityManager::checkProtectedMethod ( RexxObject target,
RexxString messageName,
size_t  count,
size_t  named_count,
RexxObject **  arguments,
ProtectedObject result 
)

Check for permission to call a protected method.

Parameters
targetThe target object.
messageNameThe name of the message.
countThe return count.
argumentsThe method arguments.
resultThe returned result.
Returns
true if the security manager handled this call, false otherwise.

Definition at line 193 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), and supportMethod.

Referenced by RexxObject::processProtectedMethod().

◆ checkRequiresAccess()

RexxString * SecurityManager::checkRequiresAccess ( RexxString name,
RexxObject *&  securityManager 
)

Check for requires file access

Parameters
nameThe name of the stream.
Returns
The actual requires file name that should be loaded. A return of OREF_NULL means access to this is not permitted.

Definition at line 347 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), supportRequires, and TheNilObject.

Referenced by PackageManager::loadRequires().

◆ checkStreamAccess()

RexxObject * SecurityManager::checkStreamAccess ( RexxString name)

Check for stream access permission.

Parameters
nameThe name of the stream.
Returns
If the security manager handles this, the replacement stream object.

Definition at line 318 of file SecurityManager.cpp.

References callSecurityManager(), RexxDirectory::fastAt(), manager, new_directory(), OREF_NULL, RexxDirectory::put(), and supportStream.

Referenced by RexxActivation::resolveStream().

◆ isManaged()

bool SecurityManager::isManaged ( )
inline

Definition at line 73 of file SecurityManager.hpp.

References manager, and OREF_NULL.

◆ live()

void SecurityManager::live ( size_t  liveMark)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 86 of file SecurityManager.cpp.

References manager, and memory_mark.

◆ liveGeneral()

void SecurityManager::liveGeneral ( int  reason)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 95 of file SecurityManager.cpp.

References manager, and memory_mark_general.

◆ operator delete() [1/2]

void SecurityManager::operator delete ( void *  )
inline

Definition at line 58 of file SecurityManager.hpp.

◆ operator delete() [2/2]

void SecurityManager::operator delete ( void *  ,
void *   
)
inline

Definition at line 56 of file SecurityManager.hpp.

◆ operator new() [1/2]

void * SecurityManager::operator new ( size_t  size)

Definition at line 50 of file SecurityManager.cpp.

References new_object(), and T_SecurityManager.

◆ operator new() [2/2]

void* SecurityManager::operator new ( size_t  ,
void *  ptr 
)
inline

Definition at line 55 of file SecurityManager.hpp.

Member Data Documentation

◆ manager

◆ supportCall

bool SecurityManager::supportCall
protected

Definition at line 82 of file SecurityManager.hpp.

Referenced by checkFunctionCall(), and SecurityManager().

◆ supportCommand

bool SecurityManager::supportCommand
protected

Definition at line 83 of file SecurityManager.hpp.

Referenced by checkCommand(), and SecurityManager().

◆ supportEnvironment

bool SecurityManager::supportEnvironment
protected

Definition at line 84 of file SecurityManager.hpp.

Referenced by checkEnvironmentAccess(), and SecurityManager().

◆ supportLocal

bool SecurityManager::supportLocal
protected

Definition at line 85 of file SecurityManager.hpp.

Referenced by checkLocalAccess(), and SecurityManager().

◆ supportMethod

bool SecurityManager::supportMethod
protected

Definition at line 86 of file SecurityManager.hpp.

Referenced by checkProtectedMethod(), and SecurityManager().

◆ supportRequires

bool SecurityManager::supportRequires
protected

Definition at line 87 of file SecurityManager.hpp.

Referenced by checkRequiresAccess(), and SecurityManager().

◆ supportStream

bool SecurityManager::supportStream
protected

Definition at line 88 of file SecurityManager.hpp.

Referenced by checkStreamAccess(), and SecurityManager().


The documentation for this class was generated from the following files: