seclabel.h 979 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * seclabel.h
  3. *
  4. * Prototypes for functions in commands/seclabel.c
  5. *
  6. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. */
  9. #ifndef SECLABEL_H
  10. #define SECLABEL_H
  11. #include "catalog/objectaddress.h"
  12. /*
  13. * Internal APIs
  14. */
  15. extern char *GetSecurityLabel(const ObjectAddress *object,
  16. const char *provider);
  17. extern void SetSecurityLabel(const ObjectAddress *object,
  18. const char *provider, const char *label);
  19. extern void DeleteSecurityLabel(const ObjectAddress *object);
  20. extern void DeleteSharedSecurityLabel(Oid objectId, Oid classId);
  21. /*
  22. * Statement and ESP hook support
  23. */
  24. extern ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt);
  25. typedef void (*check_object_relabel_type) (const ObjectAddress *object,
  26. const char *seclabel);
  27. extern void register_label_provider(const char *provider,
  28. check_object_relabel_type hook);
  29. #endif /* SECLABEL_H */