#include "magick/studio.h"#include "magick/client.h"#include "magick/configure.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/memory_.h"#include "magick/monitor.h"#include "magick/monitor-private.h"#include "magick/option.h"#include "magick/policy.h"#include "magick/semaphore.h"#include "magick/string_.h"#include "magick/token.h"#include "magick/utility.h"#include "magick/xml-tree.h"
Go to the source code of this file.
Data Structures | |
| struct | _PolicyInfo |
| struct | _PolicyMapInfo |
Defines | |
| #define | PolicyFilename "policy.xml" |
Typedefs | |
| typedef struct _PolicyMapInfo | PolicyMapInfo |
Functions | |
| static MagickBooleanType | InitializePolicyList (ExceptionInfo *) |
| static MagickBooleanType | LoadPolicyLists (const char *, ExceptionInfo *) |
| static PolicyInfo * | GetPolicyInfo (const char *name, ExceptionInfo *exception) |
| MagickExport const PolicyInfo ** | GetPolicyInfoList (const char *pattern, unsigned long *number_policies, ExceptionInfo *exception) |
| MagickExport char ** | GetPolicyList (const char *pattern, unsigned long *number_policies, ExceptionInfo *exception) |
| MagickExport char * | GetPolicyValue (const char *name) |
| MagickExport MagickBooleanType | IsRightsAuthorized (const PolicyDomain domain, const PolicyRights rights, const char *pattern) |
| MagickExport MagickBooleanType | ListPolicyInfo (FILE *file, ExceptionInfo *exception) |
| static MagickBooleanType | LoadPolicyList (const char *xml, const char *filename, const unsigned long depth, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | PolicyComponentGenesis (void) |
| static void * | DestroyPolicyElement (void *policy_info) |
| MagickExport void | PolicyComponentTerminus (void) |
Variables | |
| static const PolicyMapInfo | PolicyMap [] |
| static LinkedListInfo * | policy_list = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | policy_semaphore = (SemaphoreInfo *) NULL |
| static volatile MagickBooleanType | instantiate_policy = MagickFalse |
| #define PolicyFilename "policy.xml" |
Definition at line 62 of file policy.c.
Referenced by InitializePolicyList().
| typedef struct _PolicyMapInfo PolicyMapInfo |
| static void* DestroyPolicyElement | ( | void * | policy_info | ) | [static] |
Definition at line 989 of file policy.c.
References DestroyString(), _PolicyInfo::exempt, MagickFalse, _PolicyInfo::name, _PolicyInfo::path, _PolicyInfo::pattern, RelinquishMagickMemory(), and _PolicyInfo::value.
Referenced by PolicyComponentTerminus().
| static PolicyInfo* GetPolicyInfo | ( | const char * | name, | |
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 160 of file policy.c.
References CopyMagickString(), GetNextValueInLinkedList(), GetValueFromLinkedList(), InitializePolicyList(), InsertValueInLinkedList(), instantiate_policy, IsLinkedListEmpty(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, MaxTextExtent, _PolicyInfo::name, policy_list, policy_semaphore, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), and UnlockSemaphoreInfo().
Referenced by GetPolicyInfoList(), GetPolicyList(), GetPolicyValue(), and IsRightsAuthorized().
| MagickExport const PolicyInfo** GetPolicyInfoList | ( | const char * | pattern, | |
| unsigned long * | number_policies, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 238 of file policy.c.
References AcquireQuantumMemory(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetPolicyInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _PolicyInfo::name, policy_list, policy_semaphore, ResetLinkedListIterator(), _PolicyInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
Referenced by ListPolicyInfo().
| MagickExport char** GetPolicyList | ( | const char * | pattern, | |
| unsigned long * | number_policies, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 310 of file policy.c.
References AcquireQuantumMemory(), ConstantString(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetPolicyInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _PolicyInfo::name, policy_list, policy_semaphore, ResetLinkedListIterator(), _PolicyInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
| MagickExport char* GetPolicyValue | ( | const char * | name | ) |
Definition at line 377 of file policy.c.
References AcquireExceptionInfo(), ConstantString(), DestroyExceptionInfo(), GetMagickModule, GetPolicyInfo(), LogMagickEvent(), TraceEvent, and _PolicyInfo::value.
Referenced by GetPathTemplate(), and ResourceComponentGenesis().
| static MagickBooleanType InitializePolicyList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 423 of file policy.c.
References AcquireSemaphoreInfo(), instantiate_policy, LoadPolicyLists(), LockSemaphoreInfo(), MagickFalse, MagickTrue, policy_list, policy_semaphore, PolicyFilename, and UnlockSemaphoreInfo().
Referenced by GetPolicyInfo().
| MagickExport MagickBooleanType IsRightsAuthorized | ( | const PolicyDomain | domain, | |
| const PolicyRights | rights, | |||
| const char * | pattern | |||
| ) |
Definition at line 470 of file policy.c.
References AcquireExceptionInfo(), DestroyExceptionInfo(), _PolicyInfo::domain, ExecutePolicyRights, GetMagickModule, GetNextValueInLinkedList(), GetPolicyInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickOptionToMnemonic(), MagickPolicyDomainOptions, MagickPolicyRightsOptions, MagickTrue, _PolicyInfo::pattern, policy_list, policy_semaphore, PolicyEvent, ReadPolicyRights, ResetLinkedListIterator(), _PolicyInfo::rights, UnlockSemaphoreInfo(), and WritePolicyRights.
Referenced by InvokeDelegate(), OpenBlob(), ReadImage(), SystemCommand(), and WriteImage().
| MagickExport MagickBooleanType ListPolicyInfo | ( | FILE * | file, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 543 of file policy.c.
References ExecutePolicyRights, GetPolicyInfoList(), LocaleCompare(), MagickFalse, MagickOptionToMnemonic(), MagickPolicyDomainOptions, MagickTrue, NoPolicyRights, _PolicyInfo::path, ReadPolicyRights, RelinquishMagickMemory(), ResourcePolicyDomain, and WritePolicyRights.
| static MagickBooleanType LoadPolicyList | ( | const char * | xml, | |
| const char * | filename, | |||
| const unsigned long | depth, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 639 of file policy.c.
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _PolicyInfo::domain, _PolicyInfo::exempt, FileToString(), GetMagickModule, GetMagickToken(), GetPathComponent(), HeadPath, IsMagickTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickFalse, MagickPolicyDomainOptions, MagickPolicyRightsOptions, MagickSignature, MagickTrue, MaxTextExtent, _PolicyInfo::name, NewLinkedList(), ParseMagickOption(), _PolicyInfo::path, _PolicyInfo::pattern, policy_list, RelinquishMagickMemory(), ResetMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _PolicyInfo::rights, _PolicyInfo::signature, _PolicyInfo::stealth, ThrowFatalException, ThrowFileException, ThrowMagickException(), and _PolicyInfo::value.
Referenced by LoadPolicyLists().
| static MagickBooleanType LoadPolicyLists | ( | const char * | filename, | |
| ExceptionInfo * | exception | |||
| ) |
Definition at line 872 of file policy.c.
References AcquireMagickMemory(), AppendValueToLinkedList(), DestroyConfigureOptions(), _PolicyMapInfo::domain, _PolicyInfo::domain, _PolicyInfo::exempt, GetConfigureOptions(), GetMagickModule, GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), LoadPolicyList(), MagickFalse, MagickSignature, MagickTrue, _PolicyMapInfo::name, _PolicyInfo::name, NewLinkedList(), _PolicyInfo::path, _PolicyMapInfo::pattern, _PolicyInfo::pattern, policy_list, PolicyMap, ResetMagickMemory(), ResourceLimitError, _PolicyMapInfo::rights, _PolicyInfo::rights, _PolicyInfo::signature, ThrowFileException, ThrowMagickException(), _PolicyMapInfo::value, and _PolicyInfo::value.
Referenced by InitializePolicyList().
| MagickExport MagickBooleanType PolicyComponentGenesis | ( | void | ) |
Definition at line 964 of file policy.c.
References AcquireSemaphoreInfo(), MagickTrue, and policy_semaphore.
Referenced by MagickCoreGenesis().
| MagickExport void PolicyComponentTerminus | ( | void | ) |
Definition at line 1010 of file policy.c.
References AcquireSemaphoreInfo(), DestroyLinkedList(), DestroyPolicyElement(), DestroySemaphoreInfo(), instantiate_policy, LockSemaphoreInfo(), MagickFalse, policy_list, policy_semaphore, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
volatile MagickBooleanType instantiate_policy = MagickFalse [static] |
Definition at line 126 of file policy.c.
Referenced by GetPolicyInfo(), InitializePolicyList(), and PolicyComponentTerminus().
LinkedListInfo* policy_list = (LinkedListInfo *) NULL [static] |
Definition at line 120 of file policy.c.
Referenced by GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), InitializePolicyList(), IsRightsAuthorized(), LoadPolicyList(), LoadPolicyLists(), and PolicyComponentTerminus().
SemaphoreInfo* policy_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 123 of file policy.c.
Referenced by GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), InitializePolicyList(), IsRightsAuthorized(), PolicyComponentGenesis(), and PolicyComponentTerminus().
const PolicyMapInfo PolicyMap[] [static] |
{
{ UndefinedPolicyDomain, UndefinedPolicyRights, (const char *) NULL,
(const char *) NULL, (const char *) NULL }
}
Definition at line 113 of file policy.c.
Referenced by LoadPolicyLists().
1.6.1