1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
/*
* kadmin/v5server/kadm5_defs.h
*
* Copyright 1995 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*/
/*
* kadmind5
* Version 5 administrative daemon.
*/
#ifndef KADM5_DEFS_H__
#define KADM5_DEFS_H__
/*
* Debug definitions.
*/
#define DEBUG_SPROC 1
#define DEBUG_OPERATION 2
#define DEBUG_HOST 4
#define DEBUG_REALM 8
#define DEBUG_REQUESTS 16
#define DEBUG_ACL 32
#define DEBUG_PROTO 64
#define DEBUG_CALLS 128
#ifdef DEBUG
#define DPRINT(l1, cl, al) if ((cl & l1) != 0) printf al
#else /* DEBUG */
#define DPRINT(l1, cl, al)
#endif /* DEBUG */
#define DLOG(l1, cl, msg) if ((cl & l1) != 0) \
com_err(programname, 0, msg)
/*
* Access control bits.
*/
#define ACL_ADD_PRINCIPAL 1
#define ACL_DELETE_PRINCIPAL 2
#define ACL_MODIFY_PRINCIPAL 4
#define ACL_CHANGEPW 8
#define ACL_CHANGE_OWN_PW 16
#define ACL_INQUIRE 32
#define ACL_PRINCIPAL_MASK (ACL_ADD_PRINCIPAL|ACL_DELETE_PRINCIPAL|\
ACL_MODIFY_PRINCIPAL)
#define ACL_PASSWD_MASK (ACL_CHANGEPW|ACL_CHANGE_OWN_PW)
#define ACL_ALL_MASK (ACL_ADD_PRINCIPAL | \
ACL_DELETE_PRINCIPAL | \
ACL_MODIFY_PRINCIPAL | \
ACL_CHANGEPW | \
ACL_CHANGE_OWN_PW | \
ACL_INQUIRE)
/*
* Inter-module function prototypes
*/
/* srv_key.c */
krb5_error_code key_init
PROTOTYPE((krb5_context,
int,
int,
int,
char *,
int,
char *,
char *));
void key_finish
PROTOTYPE((krb5_context,
int));
krb5_error_code key_string_to_keys
PROTOTYPE((krb5_context,
krb5_principal,
krb5_data *,
krb5_int32,
krb5_int32,
krb5_keyblock *,
krb5_keyblock *));
krb5_error_code key_encrypt_keys
PROTOTYPE((krb5_context,
krb5_principal,
krb5_keyblock *,
krb5_keyblock *,
krb5_encrypted_keyblock *,
krb5_encrypted_keyblock *));
krb5_error_code key_decrypt_keys
PROTOTYPE((krb5_context,
krb5_principal,
krb5_encrypted_keyblock *,
krb5_encrypted_keyblock *,
krb5_keyblock *,
krb5_keyblock *));
krb5_boolean key_pwd_is_weak
PROTOTYPE((krb5_context,
krb5_principal,
krb5_data *,
krb5_int32,
krb5_int32));
/* srv_acl.c */
krb5_error_code acl_init
PROTOTYPE((krb5_context,
int,
char *));
void acl_finish
PROTOTYPE((krb5_context,
int));
krb5_boolean acl_op_permitted
PROTOTYPE((krb5_context,
krb5_principal,
krb5_int32));
/* srv_output.c */
krb5_error_code output_init
PROTOTYPE((krb5_context,
int,
char *,
krb5_boolean));
void output_finish
PROTOTYPE((krb5_context,
int));
krb5_boolean output_lang_supported
PROTOTYPE((char *));
char *output_krb5_errmsg
PROTOTYPE((char *,
krb5_boolean,
krb5_int32));
char *output_adm_error
PROTOTYPE((char *,
krb5_boolean,
krb5_int32,
krb5_int32,
krb5_int32,
krb5_data *));
/* srv_net.c */
krb5_error_code net_init
PROTOTYPE((krb5_context,
int));
void net_finish
PROTOTYPE((krb5_context,
int));
krb5_error_code net_dispatch
PROTOTYPE((krb5_context));
krb5_principal net_server_princ();
/* proto_serv.c */
krb5_error_code proto_init
PROTOTYPE((krb5_context,
int,
int));
void proto_finish
PROTOTYPE((krb5_context,
int));
krb5_error_code proto_serv
PROTOTYPE((krb5_context,
krb5_int32,
int,
void *,
void *));
/* passwd.c */
krb5_int32 passwd_check
PROTOTYPE((krb5_context,
int,
krb5_auth_context *,
krb5_ticket *,
krb5_data *,
krb5_int32 *));
krb5_int32 passwd_change
PROTOTYPE((krb5_context,
int,
krb5_auth_context *,
krb5_ticket *,
krb5_data *,
krb5_data *,
krb5_int32 *));
#endif /* KADM5_DEFS_H__ */
|