added per-handle security (untested)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40534
This commit is contained in:
David Anderson
2007-02-26 02:47:03 +00:00
parent 8567d140d2
commit e4fdaede32
4 changed files with 83 additions and 6 deletions
+18 -1
View File
@@ -39,7 +39,7 @@
#include <sp_vm_types.h>
#define SMINTERFACE_HANDLESYSTEM_NAME "IHandleSys"
#define SMINTERFACE_HANDLESYSTEM_VERSION 1
#define SMINTERFACE_HANDLESYSTEM_VERSION 2
/** Specifies no Identity */
#define DEFAULT_IDENTITY NULL
@@ -303,6 +303,23 @@ namespace SourceMod
* @return True on success, false if version is unsupported.
*/
virtual bool InitAccessDefaults(TypeAccess *pTypeAccess, HandleAccess *pHandleAccess) =0;
/**
* @brief Creates a new handle.
*
* @param type Type to use on the handle.
* @param object Object to bind to the handle.
* @param pSec Security pointer; pOwner is written as the owner,
* pIdent is used as the parent identity for authorization.
* @param pAccess Access right descriptor for the Handle; NULL for type defaults.
* @param err Optional pointer to store an error code.
* @return A new Handle_t, or 0 on failure.
*/
virtual Handle_t CreateHandleEx(HandleType_t type,
void *object,
const HandleSecurity *pSec,
const HandleAccess *pAccess,
HandleError *err) =0;
};
}