policy.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore security policy methods.
  13. */
  14. #ifndef MAGICKCORE_POLICY_H
  15. #define MAGICKCORE_POLICY_H
  16. #include "magick/pixel.h"
  17. #include "magick/exception.h"
  18. #if defined(__cplusplus) || defined(c_plusplus)
  19. extern "C" {
  20. #endif
  21. typedef enum
  22. {
  23. UndefinedPolicyDomain,
  24. CoderPolicyDomain,
  25. DelegatePolicyDomain,
  26. FilterPolicyDomain,
  27. PathPolicyDomain,
  28. ResourcePolicyDomain,
  29. SystemPolicyDomain,
  30. CachePolicyDomain,
  31. ModulePolicyDomain
  32. } PolicyDomain;
  33. typedef enum
  34. {
  35. UndefinedPolicyRights = 0x00,
  36. NoPolicyRights = 0x00,
  37. ReadPolicyRights = 0x01,
  38. WritePolicyRights = 0x02,
  39. ExecutePolicyRights = 0x04,
  40. AllPolicyRights = 0xff
  41. } PolicyRights;
  42. typedef struct _PolicyInfo
  43. PolicyInfo;
  44. extern MagickExport char
  45. *GetPolicyValue(const char *name),
  46. **GetPolicyList(const char *,size_t *,ExceptionInfo *);
  47. extern MagickExport const PolicyInfo
  48. **GetPolicyInfoList(const char *,size_t *,ExceptionInfo *);
  49. extern MagickExport MagickBooleanType
  50. IsRightsAuthorized(const PolicyDomain,const PolicyRights,const char *),
  51. ListPolicyInfo(FILE *,ExceptionInfo *),
  52. PolicyComponentGenesis(void),
  53. SetMagickSecurityPolicy(const char *,ExceptionInfo *);
  54. extern MagickExport void
  55. PolicyComponentTerminus(void);
  56. #if defined(__cplusplus) || defined(c_plusplus)
  57. }
  58. #endif
  59. #endif