xref: /illumos-gate/usr/src/lib/gss_mechs/mech_krb5/include/krb5/adm_defs.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * include/krb5/adm_defs.h
3  *
4  * Copyright 1990 by the Massachusetts Institute of Technology.
5  *
6  * Export of this software from the United States of America may
7  *   require a specific license from the United States Government.
8  *   It is the responsibility of any person or organization contemplating
9  *   export to obtain such a license before exporting.
10  *
11  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
12  * distribute this software and its documentation for any purpose and
13  * without fee is hereby granted, provided that the above copyright
14  * notice appear in all copies and that both that copyright notice and
15  * this permission notice appear in supporting documentation, and that
16  * the name of M.I.T. not be used in advertising or publicity pertaining
17  * to distribution of the software without specific, written prior
18  * permission.  M.I.T. makes no representations about the suitability of
19  * this software for any purpose.  It is provided "as is" without express
20  * or implied warranty.
21  *
22  *
23  * <<< Description >>>
24  */
25 
26 
27 #ifndef __ADM_DEFINES__
28 #define __ADM_DEFINES__
29 
30 #define ADM5_VERSTR		"ADM5VER1"
31 #define ADM5_VERSIZE		strlen(ADM5_VERSTR)
32 /* This used to be kerberos_master */
33 #define ADM5_PORTNAME		"kerberos-adm"
34 #define ADM5_DEFAULT_PORT	752
35 #define ADM5_CPW_VERSION	"V5CPWS01"
36 #define ADM5_ADM_VERSION	"V5ADMS01"
37 #define CPWNAME			"kadmin"
38 #define ADMINSTANCE		"admin"
39 
40 #define ADM_CPW_VERSION         "V5CPWS01"
41 #define ADM_MAX_PW_ITERATIONS	5
42 #define ADM_MAX_PW_CHOICES	5
43 
44 #ifdef MACH_PASS
45 #define ADM_MAX_PW_LENGTH       8
46 #define ADM_MAX_PHRASE_LENGTH	101
47 #else
48 #define ADM_MAX_PW_LENGTH       255
49 #endif
50 
51 #define CPW_SNAME               ADM5_PORTNAME
52 
53 #define MAXCPWBUFSIZE 4096
54 
55 #ifdef unicos61
56 #define SIZEOF_INADDR  SIZEOF_in_addr
57 #else
58 #define SIZEOF_INADDR sizeof(struct in_addr)
59 #endif
60 
61 /* Server */
62 #define KADMIND		0x01
63 
64 /* Applications */
65 #define KPASSWD		0x01
66 #define KSRVUTIL	0x02
67 #define KADMIN		0x03
68 
69 /* Operations */
70 #define ADDOPER		0x01    /* Add Principal */
71 #define CHGOPER		0x02    /* Change Password */
72 #define ADROPER         0x03    /* Add principal with random password */
73 #define CHROPER         0x04    /* Change to random password */
74 #define DELOPER		0x05    /* Delete Principal */
75 #define MODOPER		0x06    /* Modify Principal attributes */
76 #define INQOPER		0x07    /* Display Principal info */
77 #define AD4OPER         0x08    /* Add Principal using v4 string-to-key */
78 #define CH4OPER         0x09    /* Change password using v4 string-to-key */
79 #define COMPLETE	0x0f
80 
81 /* Extra Message Types */
82 #define SENDDATA1	0x00
83 #define SENDDATA2	0x01
84 #define SENDDATA3	0x02
85 
86 /* Unknowns */
87 #define KUNKNOWNAPPL	0xff
88 #define KUNKNOWNOPER	0xff
89 #define KUNKNOWNERR	0xff
90 
91 typedef struct {
92     char appl_code;
93     char oper_code;
94     char retn_code;
95     char FAR *message;
96 } kadmin_requests;
97 
98 #if 0
99 static char FAR *oper_type[] = {
100 	"complete",					/* 0 */
101 	"addition",					/* 1 */
102 	"deletion",					/* 2 */
103 	"change",					/* 3 */
104 	"modification",					/* 4 */
105 	"inquiry"					/* 5 */
106 };
107 #endif
108 
109 #define SKYCHANGED	0x00
110 #define NSKYRCVD	0x01
111 
112 
113 #if 0
114 static char FAR *ksrvutil_message[] = {
115 	"Service Key Changed",				/* 0 */
116 	"New Key and Version Received"			/* 1 */
117 };
118 #endif
119 
120 #define KADMGOOD	0x00
121 #define KADMSAG		0x01
122 
123 #if 0
124 static char FAR *kadmind_general_response[] = {
125 	"Success",					/* 0 */
126 	"Service Access Granted"			/* 1 */
127 };
128 #endif
129 
130 
131 #define KPASSGOOD	0x00
132 #define KPASSBAD	0x01
133 
134 #if 0
135 static char FAR *kadmind_kpasswd_response[] = {
136 	"Password Changed",				/* 0 */
137 	"Password NOT Changed!"				/* 1 */
138 };
139 #endif
140 
141 #define KSRVGOOD	0x00
142 #define KSRVBAD		0x01
143 #define KSRVCATASTROPHE	0x02
144 
145 #if 0
146 static char FAR *kadmind_ksrvutil_response[] = {
147 	"Service Password Change Complete",		/* 0 */
148 	"One or More Service Password Change(s) Failed!",	/* 1 */
149 	"Database Update Failure - Possible Catastrophe!!"	/* 2 */
150 };
151 #endif
152 
153 #define KADMGOOD	0x00
154 #define KADMBAD		0x01
155 
156 #if 0
157 static char FAR *kadmind_kadmin_response[] = {
158 	"Administrative Service Completed",		/* 0 */
159 	"Principal Unknown!",				/* 1 */
160 	"Principal Already Exists!",			/* 2 */
161 	"Allocation Failure!",				/* 3 */
162 	"Password Failure!",				/* 4 */
163 	"Protocol Failure!",				/* 5 */
164 	"Security Failure!",				/* 6 */
165 	"Admin Client Not in ACL List!",			/* 7 */
166 	"Database Update Failure - Possible Catastrophe!!"	/* 8 */
167 };
168 #endif
169 
170 #define KMODVNO		0x00
171 #define KMODATTR	0x01
172 
173 #ifdef SANDIA
174 #define KMODFCNT	0x02
175 #endif
176 
177 #define ATTRPOST	0x00
178 #define ATTRNOPOST	0x01
179 #define ATTRFOR		0x02
180 #define ATTRNOFOR	0x03
181 #define ATTRTGT		0x04
182 #define ATTRNOTGT	0x05
183 #define ATTRREN		0x06
184 #define ATTRNOREN	0x07
185 #define ATTRPROXY	0x08
186 #define ATTRNOPROXY	0x09
187 #define ATTRDSKEY	0x0a
188 #define ATTRNODSKEY	0x0b
189 #define ATTRLOCK	0x0c
190 #define ATTRUNLOCK	0x0d
191 
192 #ifdef SANDIA
193 #define ATTRPRE		0x0e
194 #define ATTRNOPRE	0x0f
195 #define ATTRPWOK	0x10
196 #define ATTRPWCHG	0x11
197 #define ATTRSID		0x12
198 #define ATTRNOSID	0x13
199 #endif
200 
201 #define ATTRNOSVR       0x14
202 #define ATTRSVR         0x15
203 
204 #define BADATTR		0x3f
205 
206 #endif /* __ADM_DEFINES__ */
207