2 * include/krb5/adm_defs.h
4 * Copyright 1990 by the Massachusetts Institute of Technology.
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.
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.
27 #ifndef __ADM_DEFINES__
28 #define __ADM_DEFINES__
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"
40 #define ADM_CPW_VERSION "V5CPWS01"
41 #define ADM_MAX_PW_ITERATIONS 5
42 #define ADM_MAX_PW_CHOICES 5
45 #define ADM_MAX_PW_LENGTH 8
46 #define ADM_MAX_PHRASE_LENGTH 101
48 #define ADM_MAX_PW_LENGTH 255
51 #define CPW_SNAME ADM5_PORTNAME
53 #define MAXCPWBUFSIZE 4096
56 #define SIZEOF_INADDR SIZEOF_in_addr
58 #define SIZEOF_INADDR sizeof(struct in_addr)
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 */
81 /* Extra Message Types */
82 #define SENDDATA1 0x00
83 #define SENDDATA2 0x01
84 #define SENDDATA3 0x02
87 #define KUNKNOWNAPPL 0xff
88 #define KUNKNOWNOPER 0xff
89 #define KUNKNOWNERR 0xff
99 static char *oper_type[] = {
104 "modification", /* 4 */
109 #define SKYCHANGED 0x00
110 #define NSKYRCVD 0x01
114 static char *ksrvutil_message[] = {
115 "Service Key Changed", /* 0 */
116 "New Key and Version Received" /* 1 */
120 #define KADMGOOD 0x00
124 static char *kadmind_general_response[] = {
126 "Service Access Granted" /* 1 */
131 #define KPASSGOOD 0x00
132 #define KPASSBAD 0x01
135 static char *kadmind_kpasswd_response[] = {
136 "Password Changed", /* 0 */
137 "Password NOT Changed!" /* 1 */
141 #define KSRVGOOD 0x00
143 #define KSRVCATASTROPHE 0x02
146 static char *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 */
153 #define KADMGOOD 0x00
157 static char *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 */
171 #define KMODATTR 0x01
174 #define KMODFCNT 0x02
177 #define ATTRPOST 0x00
178 #define ATTRNOPOST 0x01
180 #define ATTRNOFOR 0x03
182 #define ATTRNOTGT 0x05
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
194 #define ATTRNOPRE 0x0f
195 #define ATTRPWOK 0x10
196 #define ATTRPWCHG 0x11
198 #define ATTRNOSID 0x13
201 #define ATTRNOSVR 0x14
206 #endif /* __ADM_DEFINES__ */