acleval.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef __acleval_h
  13. #define __acleval_h
  14. /*
  15. * Description (acleval.h)
  16. *
  17. * This file defines the interface to the ACL evaluation module.
  18. */
  19. #include "nserror.h"
  20. #include "nsauth.h"
  21. #include "aclstruct.h"
  22. /* Define values returned by lookup routines */
  23. #define ACL_NOMATCH 0 /* no match */
  24. #define ACL_IPMATCH 0x1 /* IP address match */
  25. #define ACL_DNMATCH 0x2 /* DNS name match */
  26. #define ACL_USMATCH 0x4 /* user name match */
  27. #define ACL_GRMATCH 0x8 /* user is member of group */
  28. NSPR_BEGIN_EXTERN_C
  29. /* Functions in acleval.c */
  30. extern int aclDNSLookup(DNSFilter_t * dnf, const char * dnsspec, int fqdn, const char **match);
  31. extern int aclIPLookup(IPFilter_t * ipf, IPAddr_t ipaddr, void **match);
  32. extern int aclUserLookup(UidUser_t * uup, UserObj_t * uoptr);
  33. extern int aclEvaluate(ACL_t * acl, USI_t arid, ClAuth_t * clauth, int * padn);
  34. NSPR_END_EXTERN_C
  35. #endif /* __acleval_h */