xref: /titanic_41/usr/src/lib/krb5/kadm5/kadm_rpc.h (revision 22337b4b3c8a2b9db615e524e0e9e1fbd3dc71bf)
1 #pragma ident	"%Z%%M%	%I%	%E% SMI"
2 
3 /*
4  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
5  *
6  *	Openvision retains the copyright to derivative works of
7  *	this source code.  Do *NOT* create a derivative of this
8  *	source code before consulting with your legal department.
9  *	Do *NOT* integrate *ANY* of this source code into another
10  *	product before consulting with your legal department.
11  *
12  *	For further information, read the top-level Openvision
13  *	copyright which is contained in the top-level MIT Kerberos
14  *	copyright.
15  *
16  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
17  *
18  */
19 
20 #ifndef __KADM_RPC_H__
21 #define __KADM_RPC_H__
22 
23 #include <rpc/types.h>
24 
25 #include	<krb5.h>
26 #include	<kadm5/admin.h>
27 
28 struct cprinc_arg {
29 	krb5_ui_4 api_version;
30 	kadm5_principal_ent_rec rec;
31 	long mask;
32 	char *passwd;
33 };
34 typedef struct cprinc_arg cprinc_arg;
35 bool_t xdr_cprinc_arg();
36 
37 struct cprinc3_arg {
38 	krb5_ui_4 api_version;
39 	kadm5_principal_ent_rec rec;
40 	long mask;
41 	int n_ks_tuple;
42 	krb5_key_salt_tuple *ks_tuple;
43 	char *passwd;
44 };
45 typedef struct cprinc3_arg cprinc3_arg;
46 bool_t xdr_cprinc3_arg();
47 
48 struct generic_ret {
49 	krb5_ui_4 api_version;
50 	kadm5_ret_t code;
51 };
52 typedef struct generic_ret generic_ret;
53 bool_t xdr_generic_ret();
54 
55 struct dprinc_arg {
56 	krb5_ui_4 api_version;
57 	krb5_principal princ;
58 };
59 typedef struct dprinc_arg dprinc_arg;
60 bool_t xdr_dprinc_arg();
61 
62 struct mprinc_arg {
63 	krb5_ui_4 api_version;
64 	kadm5_principal_ent_rec rec;
65 	long mask;
66 };
67 typedef struct mprinc_arg mprinc_arg;
68 bool_t xdr_mprinc_arg();
69 
70 struct rprinc_arg {
71 	krb5_ui_4 api_version;
72 	krb5_principal src;
73 	krb5_principal dest;
74 };
75 typedef struct rprinc_arg rprinc_arg;
76 bool_t xdr_rprinc_arg();
77 
78 struct gprincs_arg {
79         krb5_ui_4 api_version;
80 	char *exp;
81 };
82 typedef struct gprincs_arg gprincs_arg;
83 bool_t xdr_gprincs_arg();
84 
85 struct gprincs_ret {
86         krb5_ui_4 api_version;
87 	kadm5_ret_t code;
88 	char **princs;
89 	int count;
90 };
91 typedef struct gprincs_ret gprincs_ret;
92 bool_t xdr_gprincs_ret();
93 
94 struct chpass_arg {
95 	krb5_ui_4 api_version;
96 	krb5_principal princ;
97 	char *pass;
98 };
99 typedef struct chpass_arg chpass_arg;
100 bool_t xdr_chpass_arg();
101 
102 struct chpass3_arg {
103 	krb5_ui_4 api_version;
104 	krb5_principal princ;
105 	krb5_boolean keepold;
106 	int n_ks_tuple;
107 	krb5_key_salt_tuple *ks_tuple;
108 	char *pass;
109 };
110 typedef struct chpass3_arg chpass3_arg;
111 bool_t xdr_chpass3_arg();
112 
113 struct setv4key_arg {
114 	krb5_ui_4 api_version;
115 	krb5_principal princ;
116         krb5_keyblock *keyblock;
117 };
118 typedef struct setv4key_arg setv4key_arg;
119 bool_t xdr_setv4key_arg();
120 
121 struct setkey_arg {
122 	krb5_ui_4 api_version;
123 	krb5_principal princ;
124         krb5_keyblock *keyblocks;
125         int n_keys;
126 };
127 typedef struct setkey_arg setkey_arg;
128 bool_t xdr_setkey_arg();
129 
130 struct setkey3_arg {
131 	krb5_ui_4 api_version;
132 	krb5_principal princ;
133 	krb5_boolean keepold;
134 	int n_ks_tuple;
135 	krb5_key_salt_tuple *ks_tuple;
136         krb5_keyblock *keyblocks;
137         int n_keys;
138 };
139 typedef struct setkey3_arg setkey3_arg;
140 bool_t xdr_setkey3_arg();
141 
142 struct chrand_arg {
143 	krb5_ui_4 api_version;
144 	krb5_principal princ;
145 };
146 typedef struct chrand_arg chrand_arg;
147 bool_t xdr_chrand_arg();
148 
149 struct chrand3_arg {
150 	krb5_ui_4 api_version;
151 	krb5_principal princ;
152 	krb5_boolean keepold;
153 	int n_ks_tuple;
154 	krb5_key_salt_tuple *ks_tuple;
155 };
156 typedef struct chrand3_arg chrand3_arg;
157 bool_t xdr_chrand3_arg();
158 
159 struct chrand_ret {
160 	krb5_ui_4 api_version;
161 	kadm5_ret_t code;
162 	krb5_keyblock key;
163 	krb5_keyblock *keys;
164 	int n_keys;
165 };
166 typedef struct chrand_ret chrand_ret;
167 bool_t xdr_chrand_ret();
168 
169 struct gprinc_arg {
170 	krb5_ui_4 api_version;
171 	krb5_principal princ;
172 	long mask;
173 };
174 typedef struct gprinc_arg gprinc_arg;
175 bool_t xdr_gprinc_arg();
176 
177 struct gprinc_ret {
178 	krb5_ui_4 api_version;
179 	kadm5_ret_t code;
180 	kadm5_principal_ent_rec rec;
181 };
182 typedef struct gprinc_ret gprinc_ret;
183 bool_t xdr_gprinc_ret();
184 bool_t xdr_kadm5_ret_t();
185 bool_t xdr_kadm5_principal_ent_rec();
186 bool_t xdr_kadm5_policy_ent_rec();
187 bool_t	xdr_krb5_keyblock();
188 bool_t	xdr_krb5_principal();
189 bool_t	xdr_krb5_enctype();
190 bool_t	xdr_krb5_octet();
191 bool_t	xdr_krb5_int32();
192 bool_t	xdr_u_int32();
193 
194 struct cpol_arg {
195 	krb5_ui_4 api_version;
196 	kadm5_policy_ent_rec rec;
197 	long mask;
198 };
199 typedef struct cpol_arg cpol_arg;
200 bool_t xdr_cpol_arg();
201 
202 struct dpol_arg {
203 	krb5_ui_4 api_version;
204 	char *name;
205 };
206 typedef struct dpol_arg dpol_arg;
207 bool_t xdr_dpol_arg();
208 
209 struct mpol_arg {
210 	krb5_ui_4 api_version;
211 	kadm5_policy_ent_rec rec;
212 	long mask;
213 };
214 typedef struct mpol_arg mpol_arg;
215 bool_t xdr_mpol_arg();
216 
217 struct gpol_arg {
218 	krb5_ui_4 api_version;
219 	char *name;
220 };
221 typedef struct gpol_arg gpol_arg;
222 bool_t xdr_gpol_arg();
223 
224 struct gpol_ret {
225 	krb5_ui_4 api_version;
226 	kadm5_ret_t code;
227 	kadm5_policy_ent_rec rec;
228 };
229 typedef struct gpol_ret gpol_ret;
230 bool_t xdr_gpol_ret();
231 
232 struct gpols_arg {
233         krb5_ui_4 api_version;
234 	char *exp;
235 };
236 typedef struct gpols_arg gpols_arg;
237 bool_t xdr_gpols_arg();
238 
239 struct gpols_ret {
240         krb5_ui_4 api_version;
241 	kadm5_ret_t code;
242 	char **pols;
243 	int count;
244 };
245 typedef struct gpols_ret gpols_ret;
246 bool_t xdr_gpols_ret();
247 
248 struct getprivs_ret {
249 	krb5_ui_4 api_version;
250 	kadm5_ret_t code;
251 	long privs;
252 };
253 typedef struct getprivs_ret getprivs_ret;
254 bool_t xdr_getprivs_ret();
255 
256 #define KADM ((krb5_ui_4)2112)
257 #define KADMVERS ((krb5_ui_4)2)
258 #define CREATE_PRINCIPAL ((krb5_ui_4)1)
259 extern generic_ret *create_principal_1_svc(cprinc_arg *arg,
260 					   struct svc_req *rqstp);
261 extern generic_ret *create_principal_1(cprinc_arg *argp, CLIENT *clnt);
262 
263 #define DELETE_PRINCIPAL ((krb5_ui_4)2)
264 extern generic_ret *delete_principal_1_svc(dprinc_arg *arg,
265 					   struct svc_req *rqstp);
266 extern generic_ret *delete_principal_1(dprinc_arg *argp, CLIENT *clnt);
267 
268 #define MODIFY_PRINCIPAL ((krb5_ui_4)3)
269 extern generic_ret *modify_principal_1_svc(mprinc_arg *arg,
270 					   struct svc_req *rqstp);
271 extern generic_ret *modify_principal_1(mprinc_arg *argp, CLIENT *clnt);
272 
273 #define RENAME_PRINCIPAL ((krb5_ui_4)4)
274 extern generic_ret *rename_principal_1_svc(rprinc_arg *arg,
275 					   struct svc_req *rqstp);
276 extern generic_ret *rename_principal_1(rprinc_arg *argp, CLIENT *clnt);
277 
278 #define GET_PRINCIPAL ((krb5_ui_4)5)
279 extern gprinc_ret *get_principal_1_svc(gprinc_arg *arg, struct svc_req *rqstp);
280 extern gprinc_ret *get_principal_1(gprinc_arg *argp, CLIENT *clnt);
281 
282 #define CHPASS_PRINCIPAL ((krb5_ui_4)6)
283 extern generic_ret *chpass_principal_1_svc(chpass_arg *arg,
284 					   struct svc_req *rqstp);
285 extern generic_ret *chpass_principal_1(chpass_arg *argp, CLIENT *clnt);
286 
287 #define CHRAND_PRINCIPAL ((krb5_ui_4)7)
288 extern chrand_ret *chrand_principal_1_svc(chrand_arg *arg,
289 					  struct svc_req *rqstp);
290 extern chrand_ret *chrand_principal_1(chrand_arg *argp, CLIENT *clnt);
291 
292 #define CREATE_POLICY ((krb5_ui_4)8)
293 extern generic_ret *create_policy_1_svc(cpol_arg *arg, struct svc_req *rqstp);
294 extern generic_ret *create_policy_1(cpol_arg *argp, CLIENT *clnt);
295 
296 #define DELETE_POLICY ((krb5_ui_4)9)
297 extern generic_ret *delete_policy_1_svc(dpol_arg *arg, struct svc_req *rqstp);
298 extern generic_ret *delete_policy_1(dpol_arg *argp, CLIENT *clnt);
299 
300 #define MODIFY_POLICY ((krb5_ui_4)10)
301 extern generic_ret *modify_policy_1_svc(mpol_arg *arg, struct svc_req *rqstp);
302 extern generic_ret *modify_policy_1(mpol_arg *argp, CLIENT *clnt);
303 
304 #define GET_POLICY ((krb5_ui_4)11)
305 extern gpol_ret *get_policy_1_svc(gpol_arg *arg, struct svc_req *rqstp);
306 extern gpol_ret *get_policy_1(gpol_arg *argp, CLIENT *clnt);
307 
308 #define GET_PRIVS ((krb5_ui_4)12)
309 extern getprivs_ret *get_privs_1_svc(krb5_ui_4 *arg, struct svc_req *rqstp);
310 extern getprivs_ret *get_privs_1(void *argp, CLIENT *clnt);
311 
312 #define INIT ((krb5_ui_4)13)
313 extern generic_ret *init_1_svc(krb5_ui_4 *arg, struct svc_req *rqstp);
314 extern generic_ret *init_1();
315 
316 #define GET_PRINCS ((krb5_ui_4) 14)
317 extern gprincs_ret *get_princs_1_svc(gprincs_arg *arg, struct svc_req *rqstp);
318 extern gprincs_ret *get_princs_1(gprincs_arg *argp, CLIENT *clnt);
319 
320 #define GET_POLS ((krb5_ui_4) 15)
321 extern gpols_ret *get_pols_1_svc(gpols_arg *arg, struct svc_req *rqstp);
322 extern gpols_ret *get_pols_1(gpols_arg *argp, CLIENT *clnt);
323 
324 #define SETKEY_PRINCIPAL ((krb5_ui_4) 16)
325 extern generic_ret *setkey_principal_1_svc(setkey_arg *arg,
326 					   struct svc_req *rqstp);
327 extern generic_ret *setkey_principal_1(setkey_arg *argp, CLIENT *clnt);
328 
329 #define SETV4KEY_PRINCIPAL ((krb5_ui_4) 17)
330 extern generic_ret *setv4key_principal_1_svc(setv4key_arg *arg,
331 					     struct svc_req *rqstp);
332 extern generic_ret *setv4key_principal_1(setv4key_arg *argp, CLIENT *clnt);
333 
334 #define CREATE_PRINCIPAL3 ((krb5_ui_4) 18)
335 extern generic_ret *create_principal3_1_svc(cprinc3_arg *arg,
336 					    struct svc_req *rqstp);
337 extern generic_ret *create_principal3_1(cprinc3_arg *argp, CLIENT *clnt);
338 
339 #define CHPASS_PRINCIPAL3 ((krb5_ui_4) 19)
340 extern generic_ret *chpass_principal3_1_svc(chpass3_arg *arg,
341 					    struct svc_req *rqstp);
342 extern generic_ret *chpass_principal3_1(chpass3_arg *argp, CLIENT *clnt);
343 
344 #define CHRAND_PRINCIPAL3 ((krb5_ui_4) 20)
345 extern chrand_ret *chrand_principal3_1_svc(chrand3_arg *arg,
346 					   struct svc_req *rqstp);
347 extern chrand_ret *chrand_principal3_1(chrand3_arg *argp, CLIENT *clnt);
348 
349 #define SETKEY_PRINCIPAL3 ((krb5_ui_4) 21)
350 extern generic_ret *setkey_principal3_1_svc(setkey3_arg *arg,
351 					    struct svc_req *rqstp);
352 extern generic_ret *setkey_principal3_1(setkey3_arg *argp, CLIENT *clnt);
353 
354 #endif /* __KADM_RPC_H__ */
355