nsautherr.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. #ifndef __nsautherr_h
  39. #define __nsautherr_h
  40. /* Define error id codes */
  41. /* Define error ids generated by nsumgmt.c */
  42. /* userRename() */
  43. #define NSAUERR1000 1000 /* insufficient dynamic memory */
  44. /* userStore() */
  45. #define NSAUERR1100 1100 /* insufficient dynamic memory */
  46. /* Define error ids generated by nsgmgmt.c */
  47. /* groupStore() */
  48. #define NSAUERR2000 2000 /* insufficient dynamic memory */
  49. /* Define error ids generated by nsadb.c */
  50. /* nsadbOpen() */
  51. #define NSAUERR3000 3000 /* invalid function argument */
  52. #define NSAUERR3020 3020 /* insufficient dynamic memory */
  53. #define NSAUERR3040 3040 /* create directory operation failed */
  54. #define NSAUERR3060 3060 /* open directory operation failed */
  55. /* nsadbOpenUsers() */
  56. #define NSAUERR3200 3200 /* invalid function argument */
  57. #define NSAUERR3220 3220 /* insufficient dynamic memory */
  58. #define NSAUERR3240 3240 /* error opening user database */
  59. /* nsadbOpenGroups() */
  60. #define NSAUERR3300 3300 /* invalid function argument */
  61. #define NSAUERR3320 3320 /* insufficient dynamic memory */
  62. #define NSAUERR3340 3340 /* error opening group database */
  63. /* nsadbOpenClients() */
  64. #define NSAUERR3400 3400 /* invalid function argument */
  65. #define NSAUERR3420 3420 /* insufficient dynamic memory */
  66. #define NSAUERR3430 3430 /* error initializing DB lock */
  67. #define NSAUERR3440 3440 /* error opening group database */
  68. /* nsadbPutUserByCert() */
  69. #define NSAUERR3500 3500 /* invalid username length */
  70. #define NSAUERR3520 3520 /* user-to-cert map already exists */
  71. /* nsadbOpenCertUsers() */
  72. #define NSAUERR3600 3600 /* error opening user-to-cert id DB */
  73. /* nsadbFindCertUser() */
  74. #define NSAUERR3700 3700 /* specified user name not found */
  75. /* nsadbAddCertUser() */
  76. #define NSAUERR3800 3800 /* error adding entry to database */
  77. /* nsadbRemoveCertUser() */
  78. #define NSAUERR3900 3900 /* error deleting entry in database */
  79. /* Define error ids generated by nsamgmt.c */
  80. /* nsadbRemoveUser() */
  81. #define NSAUERR4000 4000 /* user name not found */
  82. /* nsadbRemoveGroup() */
  83. #define NSAUERR4100 4100 /* group name not found */
  84. /* Define error codes */
  85. #define NSAERRNOMEM -1 /* insufficient dynamic memory */
  86. #define NSAERRINVAL -2 /* invalid function argument */
  87. #define NSAERROPEN -3 /* error opening database */
  88. #define NSAERRMKDIR -4 /* error creating database directory */
  89. #define NSAERRNAME -5 /* user or group name not found */
  90. #define NSAERRPUT -6 /* error writing record to database */
  91. #define NSAERRCMAP -7 /* certificate map already exists */
  92. #define NSAERRDEL -8 /* error deleting database entry */
  93. #define NSAERRLOCK -9 /* error initializing DB lock */
  94. NSPR_BEGIN_EXTERN_C
  95. /* Authentication facility name in nsuser.c */
  96. extern char * NSAuth_Program;
  97. /* Functions in nsautherr.c */
  98. extern NSAPI_PUBLIC void nsadbErrorFmt(NSErr_t * errp,
  99. char * msgbuf, int maxlen, int maxdepth);
  100. NSPR_END_EXTERN_C
  101. #endif /* __nsautherr_h */