Debian Codegraph @

include/libaccess/nsautherr.h

raw
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 __nsautherr_h
15 #define __nsautherr_h
16
17 /* Define error id codes */
18
19 /* Define error ids generated by nsumgmt.c */
20
21 /* userRename() */
22 #define NSAUERR1000 1000 /* insufficient dynamic memory */
23
24 /* userStore() */
25 #define NSAUERR1100 1100 /* insufficient dynamic memory */
26
27 /* Define error ids generated by nsgmgmt.c */
28
29 /* groupStore() */
30 #define NSAUERR2000 2000 /* insufficient dynamic memory */
31
32 /* Define error ids generated by nsadb.c */
33
34 /* nsadbOpen() */
35 #define NSAUERR3000 3000 /* invalid function argument */
36 #define NSAUERR3020 3020 /* insufficient dynamic memory */
37 #define NSAUERR3040 3040 /* create directory operation failed */
38 #define NSAUERR3060 3060 /* open directory operation failed */
39
40 /* nsadbOpenUsers() */
41 #define NSAUERR3200 3200 /* invalid function argument */
42 #define NSAUERR3220 3220 /* insufficient dynamic memory */
43 #define NSAUERR3240 3240 /* error opening user database */
44
45 /* nsadbOpenGroups() */
46 #define NSAUERR3300 3300 /* invalid function argument */
47 #define NSAUERR3320 3320 /* insufficient dynamic memory */
48 #define NSAUERR3340 3340 /* error opening group database */
49
50 /* nsadbOpenClients() */
51 #define NSAUERR3400 3400 /* invalid function argument */
52 #define NSAUERR3420 3420 /* insufficient dynamic memory */
53 #define NSAUERR3430 3430 /* error initializing DB lock */
54 #define NSAUERR3440 3440 /* error opening group database */
55
56 /* nsadbPutUserByCert() */
57 #define NSAUERR3500 3500 /* invalid username length */
58 #define NSAUERR3520 3520 /* user-to-cert map already exists */
59
60 /* nsadbOpenCertUsers() */
61 #define NSAUERR3600 3600 /* error opening user-to-cert id DB */
62
63 /* nsadbFindCertUser() */
64 #define NSAUERR3700 3700 /* specified user name not found */
65
66 /* nsadbAddCertUser() */
67 #define NSAUERR3800 3800 /* error adding entry to database */
68
69 /* nsadbRemoveCertUser() */
70 #define NSAUERR3900 3900 /* error deleting entry in database */
71
72 /* Define error ids generated by nsamgmt.c */
73
74 /* nsadbRemoveUser() */
75 #define NSAUERR4000 4000 /* user name not found */
76
77 /* nsadbRemoveGroup() */
78 #define NSAUERR4100 4100 /* group name not found */
79
80 /* Define error codes */
81 #define NSAERRNOMEM -1 /* insufficient dynamic memory */
82 #define NSAERRINVAL -2 /* invalid function argument */
83 #define NSAERROPEN -3 /* error opening database */
84 #define NSAERRMKDIR -4 /* error creating database directory */
85 #define NSAERRNAME -5 /* user or group name not found */
86 #define NSAERRPUT -6 /* error writing record to database */
87 #define NSAERRCMAP -7 /* certificate map already exists */
88 #define NSAERRDEL -8 /* error deleting database entry */
89 #define NSAERRLOCK -9 /* error initializing DB lock */
90
91 NSPR_BEGIN_EXTERN_C
92
93 /* Authentication facility name in nsuser.c */
94 extern const char *NSAuth_Program;
95
96 /* Functions in nsautherr.c */
97 extern NSAPI_PUBLIC void nsadbErrorFmt(NSErr_t *errp,
98 char *msgbuf,
99 int maxlen,
100 int maxdepth);
101
102 NSPR_END_EXTERN_C
103
104 #endif /* __nsautherr_h */