|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/client.h"#include "MagickCore/configure.h"#include "MagickCore/configure-private.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/memory_.h"#include "MagickCore/monitor.h"#include "MagickCore/monitor-private.h"#include "MagickCore/option.h"#include "MagickCore/policy.h"#include "MagickCore/policy-private.h"#include "MagickCore/semaphore.h"#include "MagickCore/string_.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"#include "MagickCore/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, size_t *number_policies, ExceptionInfo *exception) |
| MagickExport char ** | GetPolicyList (const char *pattern, size_t *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 size_t depth, ExceptionInfo *exception) |
| MagickPrivate MagickBooleanType | PolicyComponentGenesis (void) |
| static void * | DestroyPolicyElement (void *policy_info) |
| MagickPrivate 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 65 of file policy.c.
Referenced by InitializePolicyList().
| typedef struct _PolicyMapInfo PolicyMapInfo |
| static void* DestroyPolicyElement | ( | void * | policy_info | ) | [static] |
Definition at line 994 of file policy.c.
References _PolicyInfo::exempt, MagickFalse, _PolicyInfo::value, DestroyString(), _PolicyInfo::pattern, _PolicyInfo::name, _PolicyInfo::path, and RelinquishMagickMemory().
Referenced by PolicyComponentTerminus().
| static PolicyInfo* GetPolicyInfo | ( | const char * | name, |
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 163 of file policy.c.
References MaxTextExtent, policy_list, instantiate_policy, MagickFalse, InitializePolicyList(), IsLinkedListEmpty(), LocaleCompare(), GetValueFromLinkedList(), CopyMagickString(), LockSemaphoreInfo(), policy_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _PolicyInfo::name, InsertValueInLinkedList(), RemoveElementByValueFromLinkedList(), and UnlockSemaphoreInfo().
Referenced by GetPolicyInfoList(), GetPolicyList(), GetPolicyValue(), and IsRightsAuthorized().
| MagickExport const PolicyInfo** GetPolicyInfoList | ( | const char * | pattern, |
| size_t * | number_policies, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 241 of file policy.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetPolicyInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), policy_list, LockSemaphoreInfo(), policy_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _PolicyInfo::stealth, MagickFalse, GlobExpression(), _PolicyInfo::name, and UnlockSemaphoreInfo().
Referenced by ListPolicyInfo().
| MagickExport char** GetPolicyList | ( | const char * | pattern, |
| size_t * | number_policies, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 313 of file policy.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetPolicyInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), policy_list, LockSemaphoreInfo(), policy_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _PolicyInfo::stealth, MagickFalse, GlobExpression(), _PolicyInfo::name, ConstantString(), and UnlockSemaphoreInfo().
| MagickExport char* GetPolicyValue | ( | const char * | name | ) |
Definition at line 380 of file policy.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, AcquireExceptionInfo(), GetPolicyInfo(), DestroyExceptionInfo(), _PolicyInfo::value, and ConstantString().
Referenced by GetImagePixelCache(), SetMagickPrecision(), GetPathTemplate(), ResourceComponentGenesis(), and SetMagickResourceLimit().
| static MagickBooleanType InitializePolicyList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 426 of file policy.c.
References policy_list, instantiate_policy, MagickFalse, policy_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), LoadPolicyLists(), PolicyFilename, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetPolicyInfo().
| MagickExport MagickBooleanType IsRightsAuthorized | ( | const PolicyDomain | domain, |
| const PolicyRights | rights, | ||
| const char * | pattern | ||
| ) |
Definition at line 473 of file policy.c.
References LogMagickEvent(), PolicyEvent, GetMagickModule, CommandOptionToMnemonic(), MagickPolicyDomainOptions, MagickPolicyRightsOptions, AcquireExceptionInfo(), GetPolicyInfo(), DestroyExceptionInfo(), MagickTrue, LockSemaphoreInfo(), policy_semaphore, ResetLinkedListIterator(), policy_list, GetNextValueInLinkedList(), MagickFalse, _PolicyInfo::domain, GlobExpression(), _PolicyInfo::pattern, ReadPolicyRights, _PolicyInfo::rights, WritePolicyRights, ExecutePolicyRights, and UnlockSemaphoreInfo().
Referenced by OpenBlob(), ReadImage(), WriteImage(), InvokeDelegate(), InvokeDynamicImageFilter(), and SystemCommand().
| MagickExport MagickBooleanType ListPolicyInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 546 of file policy.c.
References GetPolicyInfoList(), MagickFalse, LocaleCompare(), _PolicyInfo::path, FormatLocaleFile(), CommandOptionToMnemonic(), MagickPolicyDomainOptions, ResourcePolicyDomain, _PolicyInfo::domain, SystemPolicyDomain, NoPolicyRights, ReadPolicyRights, WritePolicyRights, ExecutePolicyRights, RelinquishMagickMemory(), and MagickTrue.
| static MagickBooleanType LoadPolicyList | ( | const char * | xml, |
| const char * | filename, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 644 of file policy.c.
References MaxTextExtent, LogMagickEvent(), ConfigureEvent, GetMagickModule, MagickFalse, policy_list, NewLinkedList(), ThrowFileException, ResourceLimitError, MagickTrue, AcquireString(), GetMagickToken(), CopyMagickString(), LocaleNCompare(), LocaleCompare(), ThrowMagickException(), ConfigureError, GetPathComponent(), HeadPath, ConcatenateMagickString(), DirectorySeparator, FileToString(), RelinquishMagickMemory(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _PolicyInfo::path, ConstantString(), _PolicyInfo::exempt, _PolicyInfo::signature, MagickSignature, AppendValueToLinkedList(), _PolicyInfo::name, _PolicyInfo::domain, ParseCommandOption(), MagickPolicyDomainOptions, _PolicyInfo::pattern, _PolicyInfo::rights, MagickPolicyRightsOptions, _PolicyInfo::stealth, IsMagickTrue(), and _PolicyInfo::value.
Referenced by LoadPolicyLists().
| static MagickBooleanType LoadPolicyLists | ( | const char * | filename, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 877 of file policy.c.
References MagickFalse, policy_list, NewLinkedList(), ThrowFileException, ResourceLimitError, PolicyMap, AcquireMagickMemory(), ThrowMagickException(), GetMagickModule, _PolicyInfo::name, ResetMagickMemory(), _PolicyInfo::path, _PolicyInfo::domain, _PolicyMapInfo::domain, _PolicyInfo::rights, _PolicyMapInfo::rights, _PolicyMapInfo::name, _PolicyInfo::pattern, _PolicyMapInfo::pattern, _PolicyInfo::value, _PolicyMapInfo::value, _PolicyInfo::exempt, MagickTrue, _PolicyInfo::signature, MagickSignature, AppendValueToLinkedList(), GetConfigureOptions(), GetNextValueInLinkedList(), LoadPolicyList(), GetStringInfoDatum(), GetStringInfoPath(), and DestroyConfigureOptions().
Referenced by InitializePolicyList().
| MagickPrivate MagickBooleanType PolicyComponentGenesis | ( | void | ) |
Definition at line 969 of file policy.c.
References AcquireSemaphoreInfo(), policy_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void PolicyComponentTerminus | ( | void | ) |
Definition at line 1015 of file policy.c.
References policy_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), policy_list, DestroyLinkedList(), DestroyPolicyElement(), instantiate_policy, MagickFalse, UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
volatile MagickBooleanType instantiate_policy = MagickFalse [static] |
Definition at line 129 of file policy.c.
Referenced by GetPolicyInfo(), InitializePolicyList(), and PolicyComponentTerminus().
LinkedListInfo* policy_list = (LinkedListInfo *) NULL [static] |
Definition at line 123 of file policy.c.
Referenced by GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), InitializePolicyList(), IsRightsAuthorized(), LoadPolicyList(), LoadPolicyLists(), and PolicyComponentTerminus().
SemaphoreInfo* policy_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 126 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 116 of file policy.c.
Referenced by LoadPolicyLists().