xref: /illumos-gate/usr/src/lib/krb5/kadm5/kadm_rpc.h (revision a5f69788de7ac07553de47f7fec8c05a9a94c105)
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 
21 #include <rpc/types.h>
22 
23 #include	<krb5.h>
24 #include	<kadm5/admin.h>
25 
26 struct cprinc_arg {
27 	krb5_ui_4 api_version;
28 	kadm5_principal_ent_rec rec;
29 	long mask;
30 	char *passwd;
31 };
32 typedef struct cprinc_arg cprinc_arg;
33 bool_t xdr_cprinc_arg();
34 
35 struct cprinc3_arg {
36 	krb5_ui_4 api_version;
37 	kadm5_principal_ent_rec rec;
38 	long mask;
39 	int n_ks_tuple;
40 	krb5_key_salt_tuple *ks_tuple;
41 	char *passwd;
42 };
43 typedef struct cprinc3_arg cprinc3_arg;
44 bool_t xdr_cprinc3_arg();
45 
46 struct generic_ret {
47 	krb5_ui_4 api_version;
48 	kadm5_ret_t code;
49 };
50 typedef struct generic_ret generic_ret;
51 bool_t xdr_generic_ret();
52 
53 struct dprinc_arg {
54 	krb5_ui_4 api_version;
55 	krb5_principal princ;
56 };
57 typedef struct dprinc_arg dprinc_arg;
58 bool_t xdr_dprinc_arg();
59 
60 struct mprinc_arg {
61 	krb5_ui_4 api_version;
62 	kadm5_principal_ent_rec rec;
63 	long mask;
64 };
65 typedef struct mprinc_arg mprinc_arg;
66 bool_t xdr_mprinc_arg();
67 
68 struct rprinc_arg {
69 	krb5_ui_4 api_version;
70 	krb5_principal src;
71 	krb5_principal dest;
72 };
73 typedef struct rprinc_arg rprinc_arg;
74 bool_t xdr_rprinc_arg();
75 
76 struct gprincs_arg {
77         krb5_ui_4 api_version;
78 	char *exp;
79 };
80 typedef struct gprincs_arg gprincs_arg;
81 bool_t xdr_gprincs_arg();
82 
83 struct gprincs_ret {
84         krb5_ui_4 api_version;
85 	kadm5_ret_t code;
86 	char **princs;
87 	int count;
88 };
89 typedef struct gprincs_ret gprincs_ret;
90 bool_t xdr_gprincs_ret();
91 
92 struct chpass_arg {
93 	krb5_ui_4 api_version;
94 	krb5_principal princ;
95 	char *pass;
96 };
97 typedef struct chpass_arg chpass_arg;
98 bool_t xdr_chpass_arg();
99 
100 struct chpass3_arg {
101 	krb5_ui_4 api_version;
102 	krb5_principal princ;
103 	krb5_boolean keepold;
104 	int n_ks_tuple;
105 	krb5_key_salt_tuple *ks_tuple;
106 	char *pass;
107 };
108 typedef struct chpass3_arg chpass3_arg;
109 bool_t xdr_chpass3_arg();
110 
111 struct setv4key_arg {
112 	krb5_ui_4 api_version;
113 	krb5_principal princ;
114         krb5_keyblock *keyblock;
115 };
116 typedef struct setv4key_arg setv4key_arg;
117 bool_t xdr_setv4key_arg();
118 
119 struct setkey_arg {
120 	krb5_ui_4 api_version;
121 	krb5_principal princ;
122         krb5_keyblock *keyblocks;
123         int n_keys;
124 };
125 typedef struct setkey_arg setkey_arg;
126 bool_t xdr_setkey_arg();
127 
128 struct setkey3_arg {
129 	krb5_ui_4 api_version;
130 	krb5_principal princ;
131 	krb5_boolean keepold;
132 	int n_ks_tuple;
133 	krb5_key_salt_tuple *ks_tuple;
134         krb5_keyblock *keyblocks;
135         int n_keys;
136 };
137 typedef struct setkey3_arg setkey3_arg;
138 bool_t xdr_setkey3_arg();
139 
140 struct chrand_arg {
141 	krb5_ui_4 api_version;
142 	krb5_principal princ;
143 };
144 typedef struct chrand_arg chrand_arg;
145 bool_t xdr_chrand_arg();
146 
147 struct chrand3_arg {
148 	krb5_ui_4 api_version;
149 	krb5_principal princ;
150 	krb5_boolean keepold;
151 	int n_ks_tuple;
152 	krb5_key_salt_tuple *ks_tuple;
153 };
154 typedef struct chrand3_arg chrand3_arg;
155 bool_t xdr_chrand3_arg();
156 
157 struct chrand_ret {
158 	krb5_ui_4 api_version;
159 	kadm5_ret_t code;
160 	krb5_keyblock key;
161 	krb5_keyblock *keys;
162 	int n_keys;
163 };
164 typedef struct chrand_ret chrand_ret;
165 bool_t xdr_chrand_ret();
166 
167 struct gprinc_arg {
168 	krb5_ui_4 api_version;
169 	krb5_principal princ;
170 	long mask;
171 };
172 typedef struct gprinc_arg gprinc_arg;
173 bool_t xdr_gprinc_arg();
174 
175 struct gprinc_ret {
176 	krb5_ui_4 api_version;
177 	kadm5_ret_t code;
178 	kadm5_principal_ent_rec rec;
179 };
180 typedef struct gprinc_ret gprinc_ret;
181 bool_t xdr_gprinc_ret();
182 bool_t xdr_kadm5_ret_t();
183 bool_t xdr_kadm5_principal_ent_rec();
184 bool_t xdr_kadm5_policy_ent_rec();
185 bool_t	xdr_krb5_keyblock();
186 bool_t	xdr_krb5_principal();
187 bool_t	xdr_krb5_enctype();
188 bool_t	xdr_krb5_octet();
189 bool_t	xdr_krb5_int32();
190 bool_t	xdr_u_int32();
191 
192 struct cpol_arg {
193 	krb5_ui_4 api_version;
194 	kadm5_policy_ent_rec rec;
195 	long mask;
196 };
197 typedef struct cpol_arg cpol_arg;
198 bool_t xdr_cpol_arg();
199 
200 struct dpol_arg {
201 	krb5_ui_4 api_version;
202 	char *name;
203 };
204 typedef struct dpol_arg dpol_arg;
205 bool_t xdr_dpol_arg();
206 
207 struct mpol_arg {
208 	krb5_ui_4 api_version;
209 	kadm5_policy_ent_rec rec;
210 	long mask;
211 };
212 typedef struct mpol_arg mpol_arg;
213 bool_t xdr_mpol_arg();
214 
215 struct gpol_arg {
216 	krb5_ui_4 api_version;
217 	char *name;
218 };
219 typedef struct gpol_arg gpol_arg;
220 bool_t xdr_gpol_arg();
221 
222 struct gpol_ret {
223 	krb5_ui_4 api_version;
224 	kadm5_ret_t code;
225 	kadm5_policy_ent_rec rec;
226 };
227 typedef struct gpol_ret gpol_ret;
228 bool_t xdr_gpol_ret();
229 
230 struct gpols_arg {
231         krb5_ui_4 api_version;
232 	char *exp;
233 };
234 typedef struct gpols_arg gpols_arg;
235 bool_t xdr_gpols_arg();
236 
237 struct gpols_ret {
238         krb5_ui_4 api_version;
239 	kadm5_ret_t code;
240 	char **pols;
241 	int count;
242 };
243 typedef struct gpols_ret gpols_ret;
244 bool_t xdr_gpols_ret();
245 
246 struct getprivs_ret {
247 	krb5_ui_4 api_version;
248 	kadm5_ret_t code;
249 	long privs;
250 };
251 typedef struct getprivs_ret getprivs_ret;
252 bool_t xdr_getprivs_ret();
253 
254 #define KADM ((krb5_ui_4)2112)
255 #define KADMVERS ((krb5_ui_4)2)
256 #define CREATE_PRINCIPAL ((krb5_ui_4)1)
257 extern generic_ret *create_principal_1();
258 #define DELETE_PRINCIPAL ((krb5_ui_4)2)
259 extern generic_ret *delete_principal_1();
260 #define MODIFY_PRINCIPAL ((krb5_ui_4)3)
261 extern generic_ret *modify_principal_1();
262 #define RENAME_PRINCIPAL ((krb5_ui_4)4)
263 extern generic_ret *rename_principal_1();
264 #define GET_PRINCIPAL ((krb5_ui_4)5)
265 extern gprinc_ret *get_principal_1();
266 #define CHPASS_PRINCIPAL ((krb5_ui_4)6)
267 extern generic_ret *chpass_principal_1();
268 #define CHRAND_PRINCIPAL ((krb5_ui_4)7)
269 extern chrand_ret *chrand_principal_1();
270 #define CREATE_POLICY ((krb5_ui_4)8)
271 extern generic_ret *create_policy_1();
272 #define DELETE_POLICY ((krb5_ui_4)9)
273 extern generic_ret *delete_policy_1();
274 #define MODIFY_POLICY ((krb5_ui_4)10)
275 extern generic_ret *modify_policy_1();
276 #define GET_POLICY ((krb5_ui_4)11)
277 extern gpol_ret *get_policy_1();
278 #define GET_PRIVS ((krb5_ui_4)12)
279 extern getprivs_ret *get_privs_1();
280 #define INIT ((krb5_ui_4)13)
281 extern generic_ret *init_1();
282 #define GET_PRINCS ((krb5_ui_4) 14)
283 extern gprincs_ret *get_princs_1();
284 #define GET_POLS ((krb5_ui_4) 15)
285 extern gpols_ret *get_pols_1();
286 #define SETKEY_PRINCIPAL ((krb5_ui_4) 16)
287 extern generic_ret *setkey_principal_1();
288 #define SETV4KEY_PRINCIPAL ((krb5_ui_4) 17)
289 extern generic_ret *setv4key_principal_1();
290 #define CREATE_PRINCIPAL3 ((krb5_ui_4) 18)
291 extern generic_ret *create_principal3_1();
292 #define CHPASS_PRINCIPAL3 ((krb5_ui_4) 19)
293 extern generic_ret *chpass_principal3_1();
294 #define CHRAND_PRINCIPAL3 ((krb5_ui_4) 20)
295 extern chrand_ret *chrand_principal3_1();
296 #define SETKEY_PRINCIPAL3 ((krb5_ui_4) 21)
297 extern generic_ret *setkey_principal3_1();
298