#include "magick/studio.h"#include "magick/client.h"#include "magick/configure.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/locale_.h"#include "magick/memory_.h"#include "magick/monitor.h"#include "magick/monitor-private.h"#include "magick/option.h"#include "magick/policy.h"#include "magick/policy-private.h"#include "magick/resource_.h"#include "magick/semaphore.h"#include "magick/string_.h"#include "magick/token.h"#include "magick/utility.h"#include "magick/xml-tree.h"#include "magick/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) |
| MagickExport MagickBooleanType | PolicyComponentGenesis (void) |
| static void * | DestroyPolicyElement (void *policy_info) |
| MagickExport void | PolicyComponentTerminus (void) |
| MagickExport MagickBooleanType | SetMagickSecurityPolicy (const char *policy, 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 AcquireQuantumMemory(), 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, ResourceLimitFatalError, _PolicyMapInfo::rights, _PolicyInfo::rights, _PolicyInfo::signature, ThrowFatalException, 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(), 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(), 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 AcquireQuantumMemory(), AcquireString(), AppendValueToLinkedList(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), DirectorySeparator, _PolicyInfo::domain, _PolicyInfo::exempt, FileToXML(), GetMagickModule, GetNextToken(), GetPathComponent(), HeadPath, IsMagickTrue(), LocaleCompare(), LocaleNCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickMaxRecursionDepth, MagickPolicyDomainOptions, MagickPolicyRightsOptions, MagickTrue, MaxTextExtent, _PolicyInfo::name, ParseCommandOption(), _PolicyInfo::path, _PolicyInfo::pattern, RelinquishMagickMemory(), ResourceLimitError, ResourceLimitFatalError, _PolicyInfo::rights, _PolicyInfo::signature, _PolicyInfo::stealth, ThrowFatalException, ThrowMagickException(), and _PolicyInfo::value.
Referenced by AcquirePolicyCache(), and SetMagickSecurityPolicy().
| MagickExport MagickBooleanType PolicyComponentGenesis | ( | void | ) |
References AllocateSemaphoreInfo(), MagickTrue, and policy_semaphore.
Referenced by MagickCoreGenesis().
| MagickExport void PolicyComponentTerminus | ( | void | ) |
References ActivateSemaphoreInfo(), DestroyLinkedList(), DestroyPolicyElement(), DestroySemaphoreInfo(), LockSemaphoreInfo(), policy_cache, policy_semaphore, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
| MagickExport MagickBooleanType SetMagickSecurityPolicy | ( | const char * | policy, | |
| ExceptionInfo * | exception | |||
| ) |
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().
1.6.1