#include "MagickCore/studio.h"
#include "MagickCore/cache-private.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/magick-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.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/resource_.h"
#include "MagickCore/resource-private.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/stream-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/xml-tree.h"
#include "MagickCore/xml-tree-private.h"
Data Structures | |
struct | _PolicyInfo |
struct | _PolicyMapInfo |
Defines | |
#define | PolicyFilename "policy.xml" |
Typedefs | |
typedef struct _PolicyMapInfo | PolicyMapInfo |
Functions | |
static MagickBooleanType | IsPolicyCacheInstantiated (ExceptionInfo *) |
static MagickBooleanType | LoadPolicyCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *) |
static LinkedListInfo * | AcquirePolicyCache (const char *filename, ExceptionInfo *exception) |
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) |
MagickPrivate MagickBooleanType | PolicyComponentGenesis (void) |
static void * | DestroyPolicyElement (void *policy_info) |
MagickPrivate void | PolicyComponentTerminus (void) |
MagickExport MagickBooleanType | SetMagickSecurityPolicy (const char *policy, ExceptionInfo *exception) |
static MagickBooleanType | SetPolicyValue (const PolicyDomain domain, const char *name, const char *value) |
MagickExport MagickBooleanType | SetMagickSecurityPolicyValue (const PolicyDomain domain, const char *name, const char *value, ExceptionInfo *exception) |
Variables | |
static const PolicyMapInfo | PolicyMap [] |
static LinkedListInfo * | policy_cache = (LinkedListInfo *) NULL |
static SemaphoreInfo * | policy_semaphore = (SemaphoreInfo *) NULL |
#define PolicyFilename "policy.xml" |
Referenced by IsPolicyCacheInstantiated().
typedef struct _PolicyMapInfo PolicyMapInfo |
static LinkedListInfo* AcquirePolicyCache | ( | const char * | filename, | |
ExceptionInfo * | exception | |||
) | [static] |
References AcquireMagickMemory(), AppendValueToLinkedList(), DestroyConfigureOptions(), _PolicyMapInfo::domain, _PolicyInfo::domain, _PolicyInfo::exempt, GetConfigureOptions(), GetMagickModule, GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), LoadPolicyCache(), MagickCoreSignature, MagickFalse, MagickTrue, _PolicyInfo::name, _PolicyMapInfo::name, NewLinkedList(), _PolicyInfo::path, _PolicyMapInfo::pattern, _PolicyInfo::pattern, PolicyMap, ResourceLimitError, _PolicyMapInfo::rights, _PolicyInfo::rights, _PolicyInfo::signature, ThrowMagickException(), _PolicyMapInfo::value, and _PolicyInfo::value.
Referenced by IsPolicyCacheInstantiated().
static void* DestroyPolicyElement | ( | void * | policy_info | ) | [static] |
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] |
References CopyMagickString(), _PolicyInfo::domain, GetNextValueInLinkedList(), InsertValueInLinkedList(), IsPolicyCacheInstantiated(), LocaleCompare(), LockSemaphoreInfo(), MagickFalse, MagickPathExtent, MagickPolicyDomainOptions, MagickTrue, _PolicyInfo::name, ParseCommandOption(), policy_cache, policy_semaphore, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), UndefinedPolicyDomain, and UnlockSemaphoreInfo().
Referenced by GetPolicyInfoList(), GetPolicyList(), GetPolicyValue(), and IsRightsAuthorized().
MagickExport const PolicyInfo** GetPolicyInfoList | ( | const char * | pattern, | |
size_t * | number_policies, | |||
ExceptionInfo * | exception | |||
) |
References AcquireQuantumMemory(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetPolicyInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _PolicyInfo::name, policy_cache, policy_semaphore, ResetLinkedListIterator(), _PolicyInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
Referenced by ListPolicyInfo().
MagickExport char** GetPolicyList | ( | const char * | pattern, | |
size_t * | number_policies, | |||
ExceptionInfo * | exception | |||
) |
References AcquireQuantumMemory(), ConstantString(), GetMagickModule, GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GetPolicyInfo(), GlobExpression(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, _PolicyInfo::name, policy_cache, policy_semaphore, ResetLinkedListIterator(), _PolicyInfo::stealth, TraceEvent, and UnlockSemaphoreInfo().
MagickExport char* GetPolicyValue | ( | const char * | name | ) |
References AcquireExceptionInfo(), ConstantString(), DestroyExceptionInfo(), GetMagickModule, GetPolicyInfo(), LogMagickEvent(), TraceEvent, and _PolicyInfo::value.
Referenced by AcquirePixelCache(), AcquireStreamPixels(), AcquireUniqueSymbolicLink(), AcquireVirtualMemory(), ConnectPixelCacheServer(), DistributePixelCacheClient(), GetMaxMemoryRequest(), GetPathTemplate(), OpenPixelCache(), SetMagickPrecision(), SetMagickResourceLimit(), SetMagickSecurityPolicyValue(), and ShredFile().
static MagickBooleanType IsPolicyCacheInstantiated | ( | ExceptionInfo * | exception | ) | [static] |
References AcquirePolicyCache(), ActivateSemaphoreInfo(), LockSemaphoreInfo(), MagickFalse, MagickTrue, policy_cache, policy_semaphore, PolicyFilename, and UnlockSemaphoreInfo().
Referenced by GetPolicyInfo(), and SetMagickSecurityPolicy().
MagickExport MagickBooleanType IsRightsAuthorized | ( | const PolicyDomain | domain, | |
const PolicyRights | rights, | |||
const char * | pattern | |||
) |
References AcquireExceptionInfo(), CommandOptionToMnemonic(), DestroyExceptionInfo(), _PolicyInfo::domain, ExecutePolicyRights, GetMagickModule, GetNextValueInLinkedList(), GetPolicyInfo(), GlobExpression(), IsEventLogging(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickPolicyDomainOptions, MagickPolicyRightsOptions, MagickTrue, _PolicyInfo::pattern, policy_cache, policy_semaphore, PolicyEvent, ReadPolicyRights, ResetLinkedListIterator(), _PolicyInfo::rights, UnlockSemaphoreInfo(), and WritePolicyRights.
Referenced by ExternalDelegateCommand(), FileToBlob(), FileToImage(), InterpretImageProperties(), InvokeDelegate(), InvokeDynamicImageFilter(), IsCoderAuthorized(), OpenBlob(), and RegisterStaticModule().
MagickExport MagickBooleanType ListPolicyInfo | ( | FILE * | file, | |
ExceptionInfo * | exception | |||
) |
References CachePolicyDomain, CommandOptionToMnemonic(), _PolicyInfo::domain, ExecutePolicyRights, FormatLocaleFile(), GetPolicyInfoList(), LocaleCompare(), MagickFalse, MagickPolicyDomainOptions, MagickTrue, NoPolicyRights, _PolicyInfo::path, ReadPolicyRights, RelinquishMagickMemory(), ResourcePolicyDomain, SystemPolicyDomain, and WritePolicyRights.
static MagickBooleanType LoadPolicyCache | ( | LinkedListInfo * | cache, | |
const char * | xml, | |||
const char * | filename, | |||
const size_t | depth, | |||
ExceptionInfo * | exception | |||
) |
References AcquireCriticalMemory(), AcquireString(), AppendValueToLinkedList(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DestroyString(), DirectorySeparator, _PolicyInfo::domain, _PolicyInfo::exempt, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), HeadPath, IsStringTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickPathExtent, MagickPolicyDomainOptions, MagickPolicyRightsOptions, MagickTrue, _PolicyInfo::name, ParseCommandOption(), _PolicyInfo::path, _PolicyInfo::pattern, RelinquishMagickMemory(), ResourceLimitError, _PolicyInfo::rights, _PolicyInfo::signature, _PolicyInfo::stealth, ThrowMagickException(), and _PolicyInfo::value.
Referenced by AcquirePolicyCache(), and SetMagickSecurityPolicy().
MagickPrivate MagickBooleanType PolicyComponentGenesis | ( | void | ) |
References AcquireSemaphoreInfo(), MagickTrue, and policy_semaphore.
Referenced by MagickCoreGenesis().
MagickPrivate void PolicyComponentTerminus | ( | void | ) |
References ActivateSemaphoreInfo(), DestroyLinkedList(), DestroyPolicyElement(), LockSemaphoreInfo(), policy_cache, policy_semaphore, RelinquishSemaphoreInfo(), and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
MagickExport MagickBooleanType SetMagickSecurityPolicy | ( | const char * | policy, | |
ExceptionInfo * | exception | |||
) |
MagickExport MagickBooleanType SetMagickSecurityPolicyValue | ( | const PolicyDomain | domain, | |
const char * | name, | |||
const char * | value, | |||
ExceptionInfo * | exception | |||
) |
References CachePolicyDomain, CoderPolicyDomain, DelegatePolicyDomain, FilterPolicyDomain, GetPolicyValue(), LocaleCompare(), magick_unreferenced, MagickFalse, MagickResourceInfinity, MagickResourceOptions, ModulePolicyDomain, ParseCommandOption(), PathPolicyDomain, ResetCacheAnonymousMemory(), ResetMagickPrecision(), ResetMaxMemoryRequest(), ResetStreamAnonymousMemory(), ResetVirtualAnonymousMemory(), ResourcePolicyDomain, SetMagickResourceLimit(), SetPolicyValue(), StringToInteger(), StringToMagickSizeType(), StringToSizeType(), and SystemPolicyDomain.
static MagickBooleanType SetPolicyValue | ( | const PolicyDomain | domain, | |
const char * | name, | |||
const char * | value | |||
) | [static] |
References AcquireCriticalMemory(), AppendValueToLinkedList(), ConstantString(), DestroyString(), _PolicyInfo::domain, _PolicyInfo::exempt, GetNextValueInLinkedList(), LocaleCompare(), LockSemaphoreInfo(), MagickCoreSignature, MagickFalse, MagickTrue, _PolicyInfo::name, policy_cache, policy_semaphore, RelinquishMagickMemory(), ResetLinkedListIterator(), _PolicyInfo::signature, UnlockSemaphoreInfo(), and _PolicyInfo::value.
Referenced by SetMagickSecurityPolicyValue().
LinkedListInfo* policy_cache = (LinkedListInfo *) NULL [static] |
SemaphoreInfo* policy_semaphore = (SemaphoreInfo *) NULL [static] |
const PolicyMapInfo PolicyMap[] [static] |
{ { UndefinedPolicyDomain, UndefinedPolicyRights, (const char *) NULL, (const char *) NULL, (const char *) NULL } }
Referenced by AcquirePolicyCache().