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