Print this page
1575 untangle libmlrpc ... (smbsrv)
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/smbsrv/ndl/winreg.ndl
+++ new/usr/src/uts/common/smbsrv/ndl/winreg.ndl
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 + *
25 + * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
24 26 */
25 27
26 28 #ifndef _MLSVC_WINREG_NDL_
27 29 #define _MLSVC_WINREG_NDL_
28 30
29 31 /*
30 32 * Windows Registry (WINREG) RPC interface definition.
31 33 *
32 34 * The Windows registry is split into a number of hives, which are divided
33 35 * by function. The hive names are abbreviated and prefixed by HKEY or HK.
34 36 *
35 37 * HKEY_CLASSES_ROOT (HKCR) Information about registered applications
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
36 38 * HKEY_CURRENT_USER (HKCU) Settings for the current logged in user.
37 39 * HKEY_LOCAL_MACHINE (HKLM) Settings for all users on the computer.
38 40 * HKEY_USERS (HKU) HKEY_CURRENT_USER subkeys for user accounts.
39 41 * HKEY_CURRENT_CONFIG (HKCC) Runtime configuration information.
40 42 * HKEY_PERFORMANCE_DATA (HKPD) Runtime performance data.
41 43 * HKEY_DYN_DATA (HKDD) Runtime data for Windows 9x applications.
42 44 * HKEY_PERFORMANCE_TEXT (HKPT) Runtime performance information.
43 45 * HKEY_PERFORMANCE_NLS (HKPN) Runtime performance information.
44 46 */
45 47
46 -#include "ndrtypes.ndl"
48 +#include <libmlrpc/ndrtypes.ndl>
47 49
48 50 /* Windows NT */
49 51 #define WINREG_OPNUM_OpenHKCR 0x00
50 52 #define WINREG_OPNUM_OpenHKCU 0x01
51 53 #define WINREG_OPNUM_OpenHKLM 0x02
52 54 #define WINREG_OPNUM_OpenHKPD 0x03
53 55 #define WINREG_OPNUM_OpenHKUsers 0x04
54 56 #define WINREG_OPNUM_Close 0x05
55 57 #define WINREG_OPNUM_CreateKey 0x06
56 58 #define WINREG_OPNUM_DeleteKey 0x07
57 59 #define WINREG_OPNUM_DeleteValue 0x08
58 60 #define WINREG_OPNUM_EnumKey 0x09
59 61 #define WINREG_OPNUM_EnumValue 0x0a
60 62 #define WINREG_OPNUM_FlushKey 0x0b
61 63 #define WINREG_OPNUM_GetKeySec 0x0c
62 64 #define WINREG_OPNUM_LoadKey 0x0d
63 65 #define WINREG_OPNUM_NotifyChange 0x0e
64 66 #define WINREG_OPNUM_OpenKey 0x0f
65 67 #define WINREG_OPNUM_QueryKey 0x10
66 68 #define WINREG_OPNUM_QueryValue 0x11
67 69 #define WINREG_OPNUM_ReplaceKey 0x12
68 70 #define WINREG_OPNUM_RestoreKey 0x13
69 71 #define WINREG_OPNUM_SaveKey 0x14
70 72 #define WINREG_OPNUM_SetKeySec 0x15
71 73
72 74 /* Windows 2000 */
73 75 #define WINREG_OPNUM_CreateValue 0x16
74 76 #define WINREG_OPNUM_UnloadKey 0x17
75 77 #define WINREG_OPNUM_Shutdown 0x18
76 78 #define WINREG_OPNUM_AbortShutdown 0x19
77 79 #define WINREG_OPNUM_GetVersion 0x1a
78 80 #define WINREG_OPNUM_OpenHKCC 0x1b
79 81 #define WINREG_OPNUM_OpenHKDD 0x1c
80 82 #define WINREG_OPNUM_QueryMultiValues 0x1d
81 83 #define WINREG_OPNUM_ShutdownEx 0x1e
82 84
83 85 /* Windows XP and Windows Server 2003 */
84 86 #define WINREG_OPNUM_SavekeyEx 0x1f
85 87 #define WINREG_OPNUM_OpenHKPT 0x20
86 88 #define WINREG_OPNUM_OpenHKPN 0x21
87 89
88 90 /* Windows 2003 SP1 */
89 91 #define WINREG_OPNUM_QueryMultiValues2 0x22
90 92 #define WINREG_OPNUM_DeleteKeyEx 0x23
91 93
92 94 #define WINREG_TYPE_NONE 0
93 95 #define WINREG_SZ 1
94 96 #define WINREG_EXPAND_SZ 2
95 97 #define WINREG_BINARY 3
96 98 #define WINREG_DWORD 4
97 99 #define WINREG_DWORD_BIG_ENDIAN 5
98 100 #define WINREG_LINK 6
99 101 #define WINREG_MULTI_SZ 7
100 102 #define WINREG_RESOURCE_LIST 8
101 103 #define WINREG_RESOURCE_DESC 9
102 104 #define WINREG_RESOURCE_REQ_LIST 10
103 105 #define WINREG_QWORD 11
104 106
105 107 #define WINREG_ACCESS_QUERY_VALUE 0x00000001
106 108 #define WINREG_ACCESS_SET_VALUE 0x00000002
107 109 #define WINREG_ACCESS_CREATE_KEY 0x00000004
108 110 #define WINREG_ACCESS_ENUMERATE 0x00000008
109 111 #define WINREG_ACCESS_NOTIFY 0x00000010
110 112 #define WINREG_ACCESS_CREATE_LINK 0x00000020
111 113 #define WINREG_ACCESS_KEY64 0x00000100
112 114 #define WINREG_ACCESS_KEY32 0x00000200
113 115
114 116 CONTEXT_HANDLE(winreg_handle) winreg_handle_t;
115 117
116 118 struct winreg_string_desc {
117 119 WORD length;
118 120 WORD allosize;
119 121 LPTSTR str;
120 122 };
121 123 typedef struct winreg_string_desc winreg_string_t;
122 124
123 125 /*
124 126 * Fake Varying/Conformant with a funny conformant.
125 127 */
126 128 struct winreg_value {
127 129 DWORD vc_first_is; /* 0 */
128 130 DWORD vc_length_is;
129 131 SIZE_IS(vc_length_is)
130 132 BYTE value[ANY_SIZE_ARRAY];
131 133 };
132 134
133 135 struct winreg_vcs {
134 136 DWORD vc_first_is; /* 0 */
135 137 DWORD vc_length_is;
136 138 SIZE_IS(vc_length_is)
137 139 WORD value[ANY_SIZE_ARRAY];
138 140 };
139 141
140 142 struct winreg_vcbuf {
141 143 WORD wclen;
142 144 WORD wcsize;
143 145 struct winreg_vcs *buf;
144 146 };
145 147 typedef struct winreg_vcbuf winreg_vcbuf_t;
146 148
147 149 struct file_time {
148 150 DWORD low;
149 151 DWORD high;
150 152 };
151 153 typedef struct file_time file_time_t;
152 154
153 155 struct winreg_secdesc {
154 156 struct winreg_value *sd_buf;
155 157 DWORD sd_len;
156 158 DWORD sd_size;
157 159 };
158 160
159 161 OPERATION(WINREG_OPNUM_OpenHKCR)
160 162 struct winreg_OpenHKCR {
161 163 IN DWORD *server;
162 164 IN DWORD access_mask;
163 165 OUT winreg_handle_t handle;
164 166 OUT DWORD status;
165 167 };
166 168
167 169 OPERATION(WINREG_OPNUM_OpenHKCU)
168 170 struct winreg_OpenHKCU {
169 171 IN DWORD *server;
170 172 IN DWORD access_mask;
171 173 OUT winreg_handle_t handle;
172 174 OUT DWORD status;
173 175 };
174 176
175 177 OPERATION(WINREG_OPNUM_OpenHKLM)
176 178 struct winreg_OpenHKLM {
177 179 IN DWORD *server;
178 180 IN DWORD access_mask;
179 181 OUT winreg_handle_t handle;
180 182 OUT DWORD status;
181 183 };
182 184
183 185 OPERATION(WINREG_OPNUM_OpenHKPD)
184 186 struct winreg_OpenHKPD {
185 187 IN DWORD *server;
186 188 IN DWORD access_mask;
187 189 OUT winreg_handle_t handle;
188 190 OUT DWORD status;
189 191 };
190 192
191 193 OPERATION(WINREG_OPNUM_OpenHKUsers)
192 194 struct winreg_OpenHKUsers {
193 195 IN DWORD *server;
194 196 IN DWORD access_mask;
195 197 OUT winreg_handle_t handle;
196 198 OUT DWORD status;
197 199 };
198 200
199 201
200 202 OPERATION(WINREG_OPNUM_Close)
201 203 struct winreg_Close {
202 204 IN winreg_handle_t handle;
203 205 OUT winreg_handle_t result_handle;
204 206 OUT DWORD status;
205 207 };
206 208
207 209 #define WINREG_ACTION_NONE 0
208 210 #define WINREG_ACTION_NEW_KEY 1
209 211 #define WINREG_ACTION_EXISTING_KEY 2
210 212
211 213 OPERATION(WINREG_OPNUM_CreateKey)
212 214 struct winreg_CreateKey {
213 215 IN winreg_handle_t handle;
214 216 IN winreg_string_t subkey;
215 217 IN winreg_string_t keyclass;
216 218 IN DWORD options;
217 219 IN DWORD access_mask;
218 220 IN DWORD *sd;
219 221 OUT winreg_handle_t result_handle;
220 222 OUT DWORD *action;
221 223 OUT DWORD status;
222 224 };
223 225
224 226
225 227 OPERATION(WINREG_OPNUM_DeleteKey)
226 228 struct winreg_DeleteKey {
227 229 IN winreg_handle_t handle;
228 230 IN winreg_string_t subkey;
229 231 OUT DWORD status;
230 232 };
231 233
232 234
233 235 OPERATION(WINREG_OPNUM_DeleteValue)
234 236 struct winreg_DeleteValue {
235 237 IN winreg_handle_t handle;
236 238 IN winreg_string_t name;
237 239 OUT DWORD status;
238 240 };
239 241
240 242 /*
241 243 * Some of the OUT parameters are also supplied
242 244 * as IN parameters but we can ignore them.
243 245 */
244 246 OPERATION(WINREG_OPNUM_EnumKey)
245 247 struct winreg_EnumKey {
246 248 IN winreg_handle_t handle;
247 249 IN DWORD index;
248 250 IN winreg_string_t name_in;
249 251 IN winreg_string_t *class_in;
250 252 OUT winreg_string_t name_out;
251 253 OUT winreg_string_t *class_out;
252 254 INOUT file_time_t *change_time;
253 255 OUT DWORD status;
254 256 };
255 257
256 258 /*
257 259 * Some of the OUT parameters are also supplied
258 260 * as IN parameters but we can ignore them.
259 261 */
260 262 OPERATION(WINREG_OPNUM_EnumValue)
261 263 struct winreg_EnumValue {
262 264 IN winreg_handle_t handle;
263 265 IN DWORD index;
264 266 /* IN ignore the remaining input data */
265 267
266 268 OUT winreg_vcbuf_t name;
267 269 OUT DWORD *type;
268 270 OUT struct winreg_value *value;
269 271 OUT DWORD *value_size;
270 272 OUT DWORD *value_size_total;
271 273 OUT DWORD status;
272 274 };
273 275
274 276 OPERATION(WINREG_OPNUM_FlushKey)
275 277 struct winreg_FlushKey {
276 278 IN winreg_handle_t handle;
277 279 OUT DWORD status;
278 280 };
279 281
280 282 OPERATION(WINREG_OPNUM_GetKeySec)
281 283 struct winreg_GetKeySec {
282 284 IN winreg_handle_t handle;
283 285 IN DWORD sec_info;
284 286 OUT REFERENCE struct winreg_secdesc *sd;
285 287 OUT DWORD status;
286 288 };
287 289
288 290 OPERATION(WINREG_OPNUM_NotifyChange)
289 291 struct winreg_NotifyChange {
290 292 IN winreg_handle_t handle;
291 293 IN DWORD watch_subtree;
292 294 IN DWORD notify_filter;
293 295 OUT DWORD status;
294 296 };
295 297
296 298 OPERATION(WINREG_OPNUM_OpenKey)
297 299 struct winreg_OpenKey {
298 300 IN winreg_handle_t handle;
299 301 IN winreg_string_t name;
300 302 IN DWORD options;
301 303 IN DWORD access_mask;
302 304 OUT winreg_handle_t result_handle;
303 305 OUT DWORD status;
304 306 };
305 307
306 308
307 309 OPERATION(WINREG_OPNUM_QueryKey)
308 310 struct winreg_QueryKey {
309 311 IN winreg_handle_t handle;
310 312 INOUT winreg_string_t name;
311 313 OUT DWORD num_subkeys;
312 314 OUT DWORD max_subkey_len;
313 315 OUT DWORD max_class_len;
314 316 OUT DWORD num_values;
315 317 OUT DWORD max_value_namelen;
316 318 OUT DWORD max_value_len;
317 319 OUT DWORD secdesc_size;
318 320 OUT file_time_t last_write_time;
319 321 OUT DWORD status;
320 322 };
321 323
322 324
323 325 /*
324 326 * Some of the OUT parameters are also supplied
325 327 * as IN parameters but we can ignore them.
326 328 */
327 329 OPERATION(WINREG_OPNUM_QueryValue)
328 330 struct winreg_QueryValue {
329 331 IN winreg_handle_t handle;
330 332 IN winreg_string_t value_name;
331 333 /* IN ignore the remaining input data */
332 334
333 335 OUT DWORD *type;
334 336 OUT struct winreg_value *value;
335 337 OUT DWORD *value_size;
336 338 OUT DWORD *value_size_total;
337 339 OUT DWORD status;
338 340 };
339 341
340 342
341 343 OPERATION(WINREG_OPNUM_SetKeySec)
342 344 struct winreg_SetKeySec {
343 345 IN winreg_handle_t handle;
344 346 IN DWORD access_mask;
345 347 IN DWORD sd;
346 348 OUT DWORD status;
347 349 };
348 350
349 351 OPERATION(WINREG_OPNUM_CreateValue)
350 352 struct winreg_CreateValue {
351 353 IN winreg_handle_t handle;
352 354 IN winreg_string_t name;
353 355 IN winreg_string_t class;
354 356 IN DWORD options;
355 357 /* IN ignore the remaining input data */
356 358
357 359 OUT DWORD status;
358 360 };
359 361
360 362
361 363 /*
362 364 * The real structure of shutdown passes some strings, a timeout
363 365 * and reboot/shutdown flags but this allows us to accept the call,
364 366 * without anything appearing in the log, and return access denied.
365 367 */
366 368 OPERATION(WINREG_OPNUM_Shutdown)
367 369 struct winreg_Shutdown {
368 370 IN DWORD ignored;
369 371 OUT DWORD status;
370 372 };
371 373
372 374 OPERATION(WINREG_OPNUM_AbortShutdown)
373 375 struct winreg_AbortShutdown {
374 376 IN DWORD ignored;
375 377 OUT DWORD status;
376 378 };
377 379
378 380 OPERATION(WINREG_OPNUM_GetVersion)
379 381 struct winreg_GetVersion {
380 382 IN winreg_handle_t handle;
381 383 OUT DWORD version;
382 384 OUT DWORD status;
383 385 };
384 386
385 387 OPERATION(WINREG_OPNUM_OpenHKCC)
386 388 struct winreg_OpenHKCC {
387 389 IN DWORD *server;
388 390 IN DWORD access_mask;
389 391 OUT winreg_handle_t handle;
390 392 OUT DWORD status;
391 393 };
392 394
393 395 OPERATION(WINREG_OPNUM_OpenHKDD)
394 396 struct winreg_OpenHKDD {
395 397 IN DWORD *server;
396 398 IN DWORD access_mask;
397 399 OUT winreg_handle_t handle;
398 400 OUT DWORD status;
399 401 };
400 402
401 403 OPERATION(WINREG_OPNUM_OpenHKPT)
402 404 struct winreg_OpenHKPT {
403 405 IN DWORD *server;
404 406 IN DWORD access_mask;
405 407 OUT winreg_handle_t handle;
406 408 OUT DWORD status;
407 409 };
408 410
409 411 OPERATION(WINREG_OPNUM_OpenHKPN)
410 412 struct winreg_OpenHKPN {
411 413 IN DWORD *server;
412 414 IN DWORD access_mask;
413 415 OUT winreg_handle_t handle;
414 416 OUT DWORD status;
415 417 };
416 418
417 419 /*
418 420 * The WINREG interface.
419 421 */
420 422 INTERFACE(0)
421 423 union winreg_interface {
422 424 CASE(WINREG_OPNUM_OpenHKCR)
423 425 struct winreg_OpenHKCR OpenHKCR;
424 426 CASE(WINREG_OPNUM_OpenHKCU)
425 427 struct winreg_OpenHKCU OpenHKCU;
426 428 CASE(WINREG_OPNUM_OpenHKLM)
427 429 struct winreg_OpenHKLM OpenHKLM;
428 430 CASE(WINREG_OPNUM_OpenHKPD)
429 431 struct winreg_OpenHKPD OpenHKPD;
430 432 CASE(WINREG_OPNUM_OpenHKUsers)
431 433 struct winreg_OpenHKUsers OpenHKUsers;
432 434 CASE(WINREG_OPNUM_Close)
433 435 struct winreg_Close Close;
434 436 CASE(WINREG_OPNUM_CreateKey)
435 437 struct winreg_CreateKey CreateKey;
436 438 CASE(WINREG_OPNUM_DeleteKey)
437 439 struct winreg_DeleteKey DeleteKey;
438 440 CASE(WINREG_OPNUM_DeleteValue)
439 441 struct winreg_DeleteValue DeleteValue;
440 442 CASE(WINREG_OPNUM_EnumKey)
441 443 struct winreg_EnumKey EnumKey;
442 444 CASE(WINREG_OPNUM_EnumValue)
443 445 struct winreg_EnumValue EnumValue;
444 446 CASE(WINREG_OPNUM_FlushKey)
445 447 struct winreg_FlushKey FlushKey;
446 448 CASE(WINREG_OPNUM_GetKeySec)
447 449 struct winreg_GetKeySec GetKeySec;
448 450 CASE(WINREG_OPNUM_NotifyChange)
449 451 struct winreg_NotifyChange NotifyChange;
450 452 CASE(WINREG_OPNUM_OpenKey)
451 453 struct winreg_OpenKey OpenKey;
452 454 CASE(WINREG_OPNUM_QueryKey)
453 455 struct winreg_QueryKey QueryKey;
454 456 CASE(WINREG_OPNUM_QueryValue)
455 457 struct winreg_QueryValue QueryValue;
456 458 CASE(WINREG_OPNUM_SetKeySec)
457 459 struct winreg_SetKeySec SetKeySec;
458 460 CASE(WINREG_OPNUM_CreateValue)
459 461 struct winreg_CreateValue CreateValue;
460 462 CASE(WINREG_OPNUM_Shutdown)
461 463 struct winreg_Shutdown Shutdown;
462 464 CASE(WINREG_OPNUM_AbortShutdown)
463 465 struct winreg_AbortShutdown AbortShutdown;
464 466 CASE(WINREG_OPNUM_GetVersion)
465 467 struct winreg_GetVersion GetVersion;
466 468 CASE(WINREG_OPNUM_OpenHKCC)
467 469 struct winreg_OpenHKCC OpenHKCC;
468 470 CASE(WINREG_OPNUM_OpenHKDD)
469 471 struct winreg_OpenHKDD OpenHKDD;
470 472 CASE(WINREG_OPNUM_OpenHKPT)
471 473 struct winreg_OpenHKPT OpenHKPT;
472 474 CASE(WINREG_OPNUM_OpenHKPN)
473 475 struct winreg_OpenHKPN OpenHKPN;
474 476 };
475 477 typedef union winreg_interface winreg_interface_t;
476 478 EXTERNTYPEINFO(winreg_interface)
477 479
478 480 #endif /* _MLSVC_WINREG_NDL_ */
↓ open down ↓ |
422 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX