| 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 __aclerror_h |
| 15 |
#define __aclerror_h |
| 16 |
|
| 17 |
/* ACL facility name string (in aclbuild.c) */ |
| 18 |
NSPR_BEGIN_EXTERN_C |
| 19 |
extern const char *ACL_Program; |
| 20 |
NSPR_END_EXTERN_C |
| 21 |
|
| 22 |
/* Define error identifiers */ |
| 23 |
|
| 24 |
/* Errors generated in aclparse.c */ |
| 25 |
|
| 26 |
/* aclAuthListParse() */ |
| 27 |
#define ACLERR1000 1000 /* dynamic memory shortage */ |
| 28 |
|
| 29 |
/* aclAuthHostsParse() */ |
| 30 |
#define ACLERR1100 1100 /* unsupported list of host lists */ |
| 31 |
#define ACLERR1120 1120 /* host list name not found where expected */ |
| 32 |
#define ACLERR1140 1140 /* undefined host list name */ |
| 33 |
#define ACLERR1160 1160 /* *unused* */ |
| 34 |
#define ACLERR1180 1180 /* error adding IP filter entry */ |
| 35 |
#define ACLERR1200 1200 /* error adding DNS filter entry */ |
| 36 |
#define ACLERR1220 1220 /* ")" missing */ |
| 37 |
|
| 38 |
/* aclAuthUsersParse() */ |
| 39 |
#define ACLERR1300 1300 /* *unused* */ |
| 40 |
#define ACLERR1320 1320 /* *unused* */ |
| 41 |
#define ACLERR1340 1340 /* *unused* */ |
| 42 |
#define ACLERR1360 1360 /* undefined user or group name */ |
| 43 |
#define ACLERR1380 1380 /* duplicate user or group name */ |
| 44 |
#define ACLERR1400 1400 /* ")" missing */ |
| 45 |
#define ACLERR1420 1420 /* empty auth-user-elem */ |
| 46 |
#define ACLERR1440 1440 /* duplicate or conflicting use of "all" */ |
| 47 |
#define ACLERR1460 1460 /* duplicate or conflicting use of "any" */ |
| 48 |
#define ACLERR1480 1480 /* conflicting use of "all" or "any" */ |
| 49 |
#define ACLERR1500 1500 /* insufficient dynamic memory */ |
| 50 |
#define ACLERR1520 1520 /* insufficient dynamic memory */ |
| 51 |
|
| 52 |
/* aclDirectivesParse() */ |
| 53 |
#define ACLERR1600 1600 /* dir-access missing */ |
| 54 |
#define ACLERR1620 1620 /* invalid dir-access specification */ |
| 55 |
#define ACLERR1640 1640 /* error adding ACD_AUTH directive to ACL */ |
| 56 |
#define ACLERR1650 1650 /* error adding directive to ACL */ |
| 57 |
#define ACLERR1660 1660 /* insufficient dynamic memory */ |
| 58 |
#define ACLERR1680 1680 /* insufficient dynamic memory */ |
| 59 |
#define ACLERR1685 1685 /* insufficient dynamic memory */ |
| 60 |
#define ACLERR1690 1690 /* error adding directive to ACL */ |
| 61 |
#define ACLERR1695 1695 /* error in "execute" directive */ |
| 62 |
|
| 63 |
/* aclACLParse() */ |
| 64 |
#define ACLERR1700 1700 /* ACL statement missing */ |
| 65 |
#define ACLERR1720 1720 /* ACL name missing */ |
| 66 |
#define ACLERR1740 1740 /* opening "{" missing */ |
| 67 |
#define ACLERR1760 1760 /* closing "}" missing */ |
| 68 |
#define ACLERR1780 1780 /* unrecognized ACL statement */ |
| 69 |
|
| 70 |
/* aclFileOpen() */ |
| 71 |
#define ACLERR1900 1900 /* file open error */ |
| 72 |
#define ACLERR1920 1920 /* memory shortage for ACLFile_t */ |
| 73 |
#define ACLERR1940 1940 /* memory shortage for token */ |
| 74 |
#define ACLERR1960 1960 /* memory shortage for LEX stream */ |
| 75 |
|
| 76 |
/* aclGetDNSString() */ |
| 77 |
#define ACLERR2100 2100 /* */ |
| 78 |
#define ACLERR2120 2120 /* */ |
| 79 |
#define ACLERR2140 2140 /* */ |
| 80 |
|
| 81 |
/* aclGetIPAddr() */ |
| 82 |
#define ACLERR2200 2200 /* */ |
| 83 |
#define ACLERR2220 2220 /* */ |
| 84 |
#define ACLERR2240 2240 /* */ |
| 85 |
#define ACLERR2260 2260 /* */ |
| 86 |
#define ACLERR2280 2280 /* */ |
| 87 |
#define ACLERR2300 2300 /* */ |
| 88 |
#define ACLERR2320 2320 /* */ |
| 89 |
|
| 90 |
/* aclGetToken() */ |
| 91 |
#define ACLERR2400 2400 /* aclGetToken() parse error */ |
| 92 |
|
| 93 |
/* aclParseInit() */ |
| 94 |
|
| 95 |
/* aclRealmSpecParse() */ |
| 96 |
#define ACLERR2500 2500 /* missing realm name */ |
| 97 |
#define ACLERR2520 2520 /* undefined realm name */ |
| 98 |
#define ACLERR2540 2540 /* insufficient dynamic memory */ |
| 99 |
#define ACLERR2560 2560 /* missing realm directive */ |
| 100 |
#define ACLERR2570 2570 /* missing database filespec */ |
| 101 |
#define ACLERR2580 2580 /* missing authentication method name */ |
| 102 |
#define ACLERR2600 2600 /* unknown authentication method name */ |
| 103 |
#define ACLERR2605 2605 /* realm prompt string missing */ |
| 104 |
#define ACLERR2610 2610 /* unknown realm directive */ |
| 105 |
#define ACLERR2620 2620 /* missing "}" */ |
| 106 |
|
| 107 |
/* aclRightsParse() */ |
| 108 |
#define ACLERR2700 2700 /* missing rights list element */ |
| 109 |
#define ACLERR2720 2720 /* missing rights list name */ |
| 110 |
#define ACLERR2740 2740 /* undefined rights list name */ |
| 111 |
#define ACLERR2760 2760 /* insufficient dynamic memory */ |
| 112 |
#define ACLERR2780 2780 /* insufficient dynamic memory */ |
| 113 |
#define ACLERR2800 2800 /* error creating access right definition */ |
| 114 |
#define ACLERR2820 2820 /* insufficient dynamic memory */ |
| 115 |
#define ACLERR2840 2840 /* missing ")" */ |
| 116 |
|
| 117 |
/* aclGetFileSpec() */ |
| 118 |
#define ACLERR2900 2900 /* skip over whitespace failed */ |
| 119 |
#define ACLERR2920 2920 /* scan over filename failed */ |
| 120 |
#define ACLERR2940 2940 /* missing filename */ |
| 121 |
|
| 122 |
/* aclStringOpen() */ |
| 123 |
#define ACLERR5000 5000 /* memory shortage for ACLFile_t */ |
| 124 |
#define ACLERR5020 5020 /* memory shortage for token */ |
| 125 |
#define ACLERR5040 5040 /* memory shortage for LEX stream */ |
| 126 |
|
| 127 |
/* Errors generated in aclbuild.c */ |
| 128 |
|
| 129 |
/* accCreate() */ |
| 130 |
#define ACLERR3000 3000 /* insufficient dynamic memory */ |
| 131 |
#define ACLERR3020 3020 /* insufficient dynamic memory */ |
| 132 |
|
| 133 |
/* accFileRead() */ |
| 134 |
#define ACLERR3100 3100 /* error initializing ACL parser */ |
| 135 |
#define ACLERR3120 3120 /* error creating ACL symbol table */ |
| 136 |
|
| 137 |
/* aclCreate() */ |
| 138 |
#define ACLERR3200 3200 /* insufficient dynamic memory */ |
| 139 |
#define ACLERR3220 3220 /* duplicate ACL name */ |
| 140 |
|
| 141 |
/* aclAuthNameAdd() */ |
| 142 |
#define ACLERR3400 3400 /* realm missing for user/group name */ |
| 143 |
#define ACLERR3420 3420 /* error opening authentication DB */ |
| 144 |
#define ACLERR3440 3440 /* error finding name in DB */ |
| 145 |
#define ACLERR3460 3460 /* insufficient dynamic memory */ |
| 146 |
|
| 147 |
/* aclRightDef() */ |
| 148 |
#define ACLERR3600 3600 /* insufficient dynamic memory */ |
| 149 |
#define ACLERR3620 3620 /* add right to symbol table failed */ |
| 150 |
|
| 151 |
/* ACL_ListPostParseForAuth() */ |
| 152 |
#define ACLERR3800 3800 /* Undefined method/database */ |
| 153 |
#define ACLERR3810 3810 /* insufficient dynamic memory */ |
| 154 |
|
| 155 |
/* Register.cpp */ |
| 156 |
#define ACLERR3900 3900 /* Duplicate LAS registered */ |
| 157 |
|
| 158 |
/* ACL_EvalBuildContext */ |
| 159 |
#define ACLERR4000 4000 /* Unable to create context hash */ |
| 160 |
#define ACLERR4010 4010 /* Unable to alloc cache structure */ |
| 161 |
#define ACLERR4020 4020 /* Unable to alloc ACE entry */ |
| 162 |
#define ACLERR4030 4030 /* Unable to alloc ACE entry */ |
| 163 |
#define ACLERR4040 4040 /* Unable to alloc Auth Ptr Array */ |
| 164 |
#define ACLERR4050 4050 /* Unable to alloc Auth Ptr Array */ |
| 165 |
|
| 166 |
/* ACL_EvalTestRights */ |
| 167 |
#define ACLERR4100 4100 /* Interim absolute, non-allow value */ |
| 168 |
#define ACLERR4110 4110 /* BuildContext call failed */ |
| 169 |
|
| 170 |
/* ACL_ModuleRegister */ |
| 171 |
#define ACLERR4200 4200 /* module name missing */ |
| 172 |
#define ACLERR4210 4210 /* module registration call failed */ |
| 173 |
|
| 174 |
/* ACL_GetAttribute */ |
| 175 |
#define ACLERR4300 4300 /* Couldn't determine method */ |
| 176 |
#define ACLERR4310 4310 /* Couldn't locate Getter */ |
| 177 |
#define ACLERR4320 4320 /* Couldn't Set Attr */ |
| 178 |
#define ACLERR4330 4330 /* Couldn't Get Attr */ |
| 179 |
#define ACLERR4340 4340 /* All getters declined */ |
| 180 |
#define ACLERR4350 4350 /* All getters declined */ |
| 181 |
#define ACLERR4360 4360 /* All getters declined */ |
| 182 |
#define ACLERR4370 4370 /* All getters declined */ |
| 183 |
#define ACLERR4380 4380 /* Couldn't determine dbtype */ |
| 184 |
|
| 185 |
/* reg_dbname_internal */ |
| 186 |
#define ACLERR4400 4400 /* dbtype not defined yet */ |
| 187 |
#define ACLERR4410 4410 /* dbtype not defined yet */ |
| 188 |
#define ACLERR4420 4420 /* out of memory */ |
| 189 |
|
| 190 |
/* ACL_DatabaseRegister */ |
| 191 |
#define ACLERR4500 4500 /* database name is missing */ |
| 192 |
|
| 193 |
/* LASDnsBuild */ |
| 194 |
#define ACLERR4700 4700 /* Cannot allocatae hash */ |
| 195 |
#define ACLERR4710 4710 /* Cannot add token to hash */ |
| 196 |
#define ACLERR4720 4720 /* Cannot add token to hash */ |
| 197 |
#define ACLERR4730 4730 /* Cannot add token to hash */ |
| 198 |
#define ACLERR4740 4740 /* Cannot add token to hash */ |
| 199 |
#define ACLERR4750 4750 /* Cannot add token to hash */ |
| 200 |
#define ACLERR4760 4760 /* Cannot add token to hash */ |
| 201 |
#define ACLERR4770 4770 /* Invalid attribute pattern */ |
| 202 |
|
| 203 |
/* LASDnsEval */ |
| 204 |
#define ACLERR4800 4800 /* Wrong attribute name */ |
| 205 |
#define ACLERR4810 4810 /* Illegal comparator */ |
| 206 |
#define ACLERR4820 4820 /* Cannot allocate context struct */ |
| 207 |
#define ACLERR4830 4830 /* Cannot get DNS attribute */ |
| 208 |
|
| 209 |
/* LASGroupEval */ |
| 210 |
#define ACLERR4900 4900 /* wrong attribute */ |
| 211 |
#define ACLERR4910 4910 /* bad comparator */ |
| 212 |
#define ACLERR4920 4920 /* unable to get database name */ |
| 213 |
|
| 214 |
/* LASIpTreeAllocNode */ |
| 215 |
#define ACLERR5000 5000 /* Cannot allocate IP tree */ |
| 216 |
|
| 217 |
/* LASIpAddPattern */ |
| 218 |
#define ACLERR5100 5100 /* Cannot allocate IP tree node */ |
| 219 |
#define ACLERR5110 5110 /* Cannot allocate IP tree node */ |
| 220 |
|
| 221 |
/* LASIpEval */ |
| 222 |
#define ACLERR5200 5200 /* Wrong attribute */ |
| 223 |
#define ACLERR5210 5210 /* Bad comparator */ |
| 224 |
#define ACLERR5220 5220 /* Cannot get session pointer */ |
| 225 |
#define ACLERR5230 5230 /* Cannot allocate context */ |
| 226 |
#define ACLERR5240 5240 /* Tested 32 bits without conclusion */ |
| 227 |
|
| 228 |
/* LASProgramEval */ |
| 229 |
#define ACLERR5300 5300 /* Wrong attribute */ |
| 230 |
#define ACLERR5310 5310 /* Bad comparator */ |
| 231 |
#define ACLERR5320 5320 /* Can't get request pointer */ |
| 232 |
#define ACLERR5330 5330 /* Invalid program expression */ |
| 233 |
#define ACLERR5340 5340 /* Rejecting Request */ |
| 234 |
|
| 235 |
/* LASDayOfWeekEval */ |
| 236 |
#define ACLERR5400 5400 /* wrong attribute */ |
| 237 |
#define ACLERR5410 5410 /* bad comparator */ |
| 238 |
|
| 239 |
/* LASTimeOfDayEval */ |
| 240 |
#define ACLERR5600 5600 /* wrong attribute */ |
| 241 |
#define ACLERR5610 5610 /* bad comparator */ |
| 242 |
|
| 243 |
/* LASUserEval */ |
| 244 |
#define ACLERR5700 5700 /* wrong attribute */ |
| 245 |
#define ACLERR5710 5710 /* bad comparator */ |
| 246 |
#define ACLERR5720 5720 /* Out of memory */ |
| 247 |
|
| 248 |
/* ldapacl.cpp */ |
| 249 |
#define ACLERR5800 5800 /* missing the database url */ |
| 250 |
#define ACLERR5810 5810 /* missing the database name */ |
| 251 |
#define ACLERR5820 5820 /* error parsing the db url */ |
| 252 |
#define ACLERR5830 5830 /* unable to get db name */ |
| 253 |
#define ACLERR5840 5840 /* can't get parsed db name */ |
| 254 |
#define ACLERR5850 5850 /* can't init ldap connection */ |
| 255 |
#define ACLERR5860 5860 /* passwd check ldap error */ |
| 256 |
#define ACLERR5870 5870 /* Out of memory */ |
| 257 |
#define ACLERR5880 5880 /* User doesn't exist anymore */ |
| 258 |
#define ACLERR5890 5890 /* PList error */ |
| 259 |
|
| 260 |
/* get_user_ismember_ldap */ |
| 261 |
#define ACLERR5900 5900 /* Can't get db name */ |
| 262 |
#define ACLERR5910 5910 /* Can't get parsed db name */ |
| 263 |
#define ACLERR5920 5920 /* Out of memory */ |
| 264 |
#define ACLERR5930 5930 /* Can't init ldap connection */ |
| 265 |
#define ACLERR5940 5940 /* Group doesn't exist */ |
| 266 |
#define ACLERR5950 5950 /* LDAP error */ |
| 267 |
|
| 268 |
/* ACL_LDAPDatabaseHandle */ |
| 269 |
#define ACLERR6000 6000 /* Not a registered db */ |
| 270 |
#define ACLERR6010 6010 /* Not an LDAP db */ |
| 271 |
#define ACLERR6020 6020 /* Out of memory */ |
| 272 |
#define ACLERR6030 6030 /* Can't init ldap connection */ |
| 273 |
#define ACLERR6040 6040 /* Can't bind to ldap server */ |
| 274 |
|
| 275 |
|
| 276 |
/* Define error return codes */ |
| 277 |
#define ACLERRNOMEM -1 /* insufficient dynamic memory */ |
| 278 |
#define ACLERROPEN -2 /* file open error */ |
| 279 |
#define ACLERRDUPSYM -3 /* duplicate symbol */ |
| 280 |
#define ACLERRSYNTAX -4 /* syntax error */ |
| 281 |
#define ACLERRUNDEF -5 /* undefined symbol */ |
| 282 |
#define ACLERRADB -6 /* authentication DB access error */ |
| 283 |
#define ACLERRPARSE -7 /* ACL parsing error */ |
| 284 |
#define ACLERRNORLM -8 /* missing authentication realm */ |
| 285 |
#define ACLERRIO -9 /* IO error */ |
| 286 |
#define ACLERRINTERNAL -10 /* internal processing error */ |
| 287 |
/* #define ACLERRFAIL -11 */ /* defined in include/public/nsacl/acldef.h */ |
| 288 |
#define ACLERRINVAL -12 /* invalid argument */ |
| 289 |
#define ACLERRCONFIG -13 /* auth realms don't math acl */ |
| 290 |
|
| 291 |
#include "nserror.h" |
| 292 |
|
| 293 |
#ifndef PUBLIC_NSACL_ACLDEF_H |
| 294 |
#include "public/nsacl/acldef.h" |
| 295 |
#endif /* !PUBLIC_NSACL_ACLDEF_H */ |
| 296 |
|
| 297 |
NSPR_BEGIN_EXTERN_C |
| 298 |
|
| 299 |
/* Functions in aclerror.c */ |
| 300 |
extern void aclErrorFmt(NSErr_t *errp, |
| 301 |
char *msgbuf, |
| 302 |
int maxlen, |
| 303 |
int maxdepth); |
| 304 |
|
| 305 |
NSPR_END_EXTERN_C |
| 306 |
|
| 307 |
#endif /* __aclerror_h */ |