aclglobal.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. /*
  13. ** Header file containing global data elements. These are duplicated
  14. ** when a cache flush is done.
  15. */
  16. #include <libaccess/acl.h>
  17. struct ACLGlobal_s
  18. {
  19. ACLListHandle_t *primarylist;
  20. pool_handle_t *pool; /* Deallocate at the start of cache flush */
  21. pool_handle_t *databasepool;
  22. pool_handle_t *methodpool;
  23. PRHashTable *urihash;
  24. PRHashTable *urigethash;
  25. PRHashTable *listhash;
  26. PRHashTable *evalhash;
  27. PRHashTable *flushhash;
  28. PRHashTable *methodhash;
  29. PRHashTable *dbtypehash;
  30. PRHashTable *dbnamehash;
  31. PRHashTable *attrgetterhash;
  32. PRHashTable *userLdbHash; /* user's LDAP handle hash */
  33. };
  34. typedef struct ACLGlobal_s ACLGlobal_t;
  35. typedef struct ACLGlobal_s *ACLGlobal_p;
  36. #define acl_uri_hash_pool ACLGlobal->pool
  37. #define acl_uri_hash ACLGlobal->urihash
  38. #define acl_uri_get_hash ACLGlobal->urigethash
  39. #define ACLListHash ACLGlobal->listhash
  40. #define ACLLasEvalHash ACLGlobal->evalhash
  41. #define ACLLasFlushHash ACLGlobal->flushhash
  42. #define ACLMethodHash ACLGlobal->methodhash
  43. #define ACLDbTypeHash ACLGlobal->dbtypehash
  44. #define ACLDbNameHash ACLGlobal->dbnamehash
  45. #define ACLAttrGetterHash ACLGlobal->attrgetterhash
  46. #define ACLUserLdbHash ACLGlobal->userLdbHash
  47. #define ACL_DATABASE_POOL ACLGlobal->databasepool
  48. #define ACL_METHOD_POOL ACLGlobal->methodpool
  49. NSPR_BEGIN_EXTERN_C
  50. extern ACLGlobal_p ACLGlobal;
  51. extern ACLGlobal_p oldACLGlobal;
  52. NSPR_END_EXTERN_C