1
0

aclerror.h 11 KB

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