roles_cache.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. *
  6. * License: GPL (version 3 or any later version).
  7. * See LICENSE for details.
  8. * END COPYRIGHT BLOCK **/
  9. #ifdef HAVE_CONFIG_H
  10. # include <config.h>
  11. #endif
  12. #if !defined( _ROLES_CACHE_H )
  13. #define SLAPD_ROLES_INTERFACE "roles-slapd"
  14. #define ROLES_PLUGIN_SUBSYSTEM "roles-plugin"
  15. #define NSROLEATTR "nsRole"
  16. #define ROLE_DEFINITION_FILTER "(&(objectclass=nsRoleDefinition)(objectclass=ldapsubentry))"
  17. #define OBJ_FILTER "(|(objectclass=*)(objectclass=ldapsubentry))"
  18. #define ROLE_TYPE_MANAGED 1
  19. #define ROLE_TYPE_FILTERED 2
  20. #define ROLE_TYPE_NESTED 3
  21. #define ROLE_OBJECTCLASS_MANAGED "nsManagedRoleDefinition"
  22. #define ROLE_OBJECTCLASS_FILTERED "nsFilteredRoleDefinition"
  23. #define ROLE_OBJECTCLASS_NESTED "nsNestedRoleDefinition"
  24. #define ROLE_FILTER_ATTR_NAME "nsRoleFilter"
  25. #define ROLE_MANAGED_ATTR_NAME "nsRoleDN"
  26. #define ROLE_NESTED_ATTR_NAME "nsRoleDN"
  27. #define ROLE_SCOPE_DN "nsRoleScopeDN"
  28. #define SLAPI_ROLE_ERROR_NO_FILTER_SPECIFIED -1
  29. #define SLAPI_ROLE_ERROR_FILTER_BAD -2
  30. #define SLAPI_ROLE_DEFINITION_DOESNT_EXIST -3
  31. #define SLAPI_ROLE_DEFINITION_ERROR -4
  32. #define SLAPI_ROLE_DEFINITION_ALREADY_EXIST -5
  33. /* From roles_cache.c */
  34. int roles_cache_init();
  35. void roles_cache_stop();
  36. void roles_cache_change_notify(Slapi_PBlock *pb);
  37. int roles_cache_listroles(Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
  38. int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
  39. int roles_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn, int *present);
  40. /* From roles_plugin.c */
  41. int roles_init( Slapi_PBlock *pb );
  42. int roles_sp_get_value(vattr_sp_handle *handle, vattr_context *c, Slapi_Entry *e, char *type, Slapi_ValueSet** results,int *type_name_disposition, char** actual_type_name, int flags, int *free_flags, void *hint);
  43. int roles_sp_compare_value(vattr_sp_handle *handle, vattr_context *c, Slapi_Entry *e, char *type, Slapi_Value *test_this, int* result,int flags, void *hint);
  44. int roles_sp_list_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_context *type_context,int flags);
  45. void * roles_get_plugin_identity();
  46. #endif /* _ROLES_CACHE_H */