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