summaryrefslogtreecommitdiffstats
path: root/src/kadmin/server/adm_extern.h
blob: 1b8ae365f04eacc03ec6d48fbe77805f593c30e6 (plain)
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
/*
 * kadmin/server/adm_extern.h
 *
 * Copyright 1990 by the Massachusetts Institute of Technology.
 *
 * 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.
 * 
 * Sandia National Laboratories also makes no representations about the 
 * suitability of the modifications, or additions to this software for 
 * any purpose.  It is provided "as is" without express or implied warranty.
 *
 * <<< Description >>>
 */

#include <krb5/copyright.h>

#ifndef __ADM_EXTERN__
#define __ADM_EXTERN__

typedef struct {
	/* Client Info */
  struct sockaddr_in client_name;
  krb5_address client_addr;
  krb5_principal client;
  char *name_of_client;
	/* Server Info */
  struct sockaddr_in server_name;
  krb5_address server_addr;
  krb5_principal server;
  char *name_of_service;
	/* Miscellaneous */
  int server_socket;
  int client_socket;
} global_client_server_info;
 
/* various externs for KDC */
extern krb5_encrypt_block master_encblock;
extern krb5_keyblock master_keyblock;
extern krb5_principal master_princ;
extern krb5_db_entry master_entry;

extern volatile int signal_requests_exit;
extern char *dbm_db_name;

extern krb5_keyblock tgs_key;
extern krb5_kvno tgs_kvno;
extern krb5_principal tgs_server;

extern global_client_server_info client_server_info;
extern char *adm5_tcp_portname;
extern int adm5_tcp_port_fd;

extern unsigned pidarraysize;
extern int *pidarray;

extern char *adm5_ver_str;
extern int adm5_ver_len;

extern int adm_debug_flag;

extern int send_seqno;
extern int recv_seqno;

extern int exit_now;

extern krb5_data inbuf;
extern krb5_data msg_data;

extern char *oper_type[];
extern char *ksrvutil_message[];
extern char *kadmind_general_response[];
extern char *kadmind_kpasswd_response[];
extern char *kadmind_ksrvutil_response[];
extern char *kadmind_kadmin_response[];

/* PROTOTYPES */

krb5_error_code adm_build_key
	PROTOTYPE((krb5_context,
		   krb5_principal,
		   krb5_ticket *,
		   char *,
		   int,
		   krb5_db_entry));

krb5_error_code adm_change_pwd
	PROTOTYPE((krb5_context,
		   char *,
		   char *,
		   krb5_ticket *,
		   int));

krb5_error_code adm_change_pwd_rnd
	PROTOTYPE((krb5_context,
		   char *,
		   char *,
		   krb5_ticket *));

krb5_error_code adm_add_new_key
	PROTOTYPE((krb5_context,
		   char *,
		   char *,
		   krb5_ticket *,
		   int));

krb5_error_code adm_add_new_key_rnd
	PROTOTYPE((krb5_context, 
		   char *,
		   char *,
		   krb5_ticket *));

krb5_error_code adm_del_old_key
	PROTOTYPE((krb5_context,
		   char *,
		   char *));

krb5_error_code adm_mod_old_key
	PROTOTYPE((krb5_context,
		   char *,
		   char *,
		   krb5_ticket* ));

krb5_error_code adm_inq_old_key
	PROTOTYPE((krb5_context, 
		   char *,
		   char *,
		   krb5_ticket *));

krb5_error_code adm_print_exp_time
	PROTOTYPE((krb5_context, 
		   char *,
		   krb5_timestamp));

krb5_kvno adm_princ_exists
	PROTOTYPE((krb5_context, 
		   char *,
		   krb5_principal,
		   krb5_db_entry *,
		   int *));

krb5_error_code adm_enter_rnd_pwd_key
	PROTOTYPE((krb5_context,
		   char *,
		   krb5_principal,
		   int,
		   krb5_db_entry *));

krb5_error_code adm5_kadmin
	PROTOTYPE((krb5_context,
    		   char *,  
    		   krb5_authenticator *,
    		   krb5_ticket *,
    		   char *,
    		   int *));

krb5_error_code adm_negotiate_key
	PROTOTYPE((krb5_context,
		   char const *,
		   krb5_ticket *,
		   char *));

krb5_error_code setup_network
	PROTOTYPE((krb5_context,
		   const char *));

krb5_error_code cpw_keyproc
	PROTOTYPE((krb5_context, 
		   krb5_pointer,
		   krb5_principal,
		   krb5_kvno,
		   krb5_keytype,
		   krb5_keyblock **));

krb5_error_code process_client
	PROTOTYPE((krb5_context, 
		   char *));

krb5_error_code cleanexit
	PROTOTYPE((krb5_context,
		   int));

krb5_error_code closedown_db
	PROTOTYPE((krb5_context));

krb5_error_code process_args
	PROTOTYPE((krb5_context, 
		   int,
		   char **));

krb5_error_code init_db
	PROTOTYPE((krb5_context,
		   char *,
		   krb5_principal,
		   krb5_keyblock *));

void setup_com_err
	PROTOTYPE((krb5_context));

krb5_error_code princ_exists
	PROTOTYPE((krb5_context, 
		   krb5_principal, 
		   krb5_db_entry *));

krb5_error_code adm_enter_pwd_key
	PROTOTYPE((krb5_context,
   		   char * ,
    		   char * ,
    		   krb5_const_principal ,
    		   krb5_const_principal ,
    		   int ,
    		   int ,
    		   char * ,
    		   krb5_db_entry * ));

krb5_error_code adm5_change
	PROTOTYPE((krb5_context,
	    	   char *,
    		   krb5_principal ,
    		   krb5_ticket *));

int adm5_listen_and_process
	PROTOTYPE((krb5_context,
	    	   const char *));

krb5_error_code adm5_kpasswd
	PROTOTYPE((krb5_context,
    		   char *,
    		   kadmin_requests *,
    		   krb5_ticket *,
    		   char *,
    		   int *));

#endif /* __ADM_EXTERN__ */