1/*
2 * IDENTIFICATION:
3 * stub generated by bootstrap_cmds-133
4 * OPTIONS:
5 * KernelUser
6 */
7#define __MIG_check__Reply__vfs_nspace_subsystem__ 1
8
9#include "vfs_nspace.h"
10
11/* TODO: #include <mach/mach.h> */
12#ifdef __cplusplus
13extern "C" {
14#endif /* __cplusplus */
15extern void mach_msg_destroy(mach_msg_header_t *);
16#ifdef __cplusplus
17}
18#endif /* __cplusplus */
19
20#ifndef mig_internal
21#define mig_internal static __inline__
22#endif /* mig_internal */
23
24#ifndef mig_external
25#define mig_external
26#endif /* mig_external */
27
28#if !defined(__MigTypeCheck) && defined(TypeCheck)
29#define __MigTypeCheck TypeCheck /* Legacy setting */
30#endif /* !defined(__MigTypeCheck) */
31
32#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
33#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
34#endif /* !defined(__MigKernelSpecificCode) */
35
36#ifndef LimitCheck
37#define LimitCheck 0
38#endif /* LimitCheck */
39
40#ifndef min
41#define min(a,b) ( ((a) < (b))? (a): (b) )
42#endif /* min */
43
44#if !defined(_WALIGN_)
45#define _WALIGN_(x) (((x) + 3) & ~3)
46#endif /* !defined(_WALIGN_) */
47
48#if !defined(_WALIGNSZ_)
49#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
50#endif /* !defined(_WALIGNSZ_) */
51
52#ifndef UseStaticTemplates
53#define UseStaticTemplates 0
54#endif /* UseStaticTemplates */
55
56#ifndef MIG_SERVER_ROUTINE
57#define MIG_SERVER_ROUTINE
58#endif
59
60#ifndef __MachMsgErrorWithTimeout
61#define __MachMsgErrorWithTimeout(_R_) { \
62 switch (_R_) { \
63 case MACH_SEND_INVALID_DATA: \
64 case MACH_SEND_INVALID_DEST: \
65 case MACH_SEND_INVALID_HEADER: \
66 mig_put_reply_port(InP->Head.msgh_reply_port); \
67 break; \
68 case MACH_SEND_TIMED_OUT: \
69 case MACH_RCV_TIMED_OUT: \
70 default: \
71 mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
72 } \
73}
74#endif /* __MachMsgErrorWithTimeout */
75
76#ifndef __MachMsgErrorWithoutTimeout
77#define __MachMsgErrorWithoutTimeout(_R_) { \
78 switch (_R_) { \
79 case MACH_SEND_INVALID_DATA: \
80 case MACH_SEND_INVALID_DEST: \
81 case MACH_SEND_INVALID_HEADER: \
82 mig_put_reply_port(InP->Head.msgh_reply_port); \
83 break; \
84 default: \
85 mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
86 } \
87}
88#endif /* __MachMsgErrorWithoutTimeout */
89
90#ifndef __DeclareSendRpc
91#define __DeclareSendRpc(_NUM_, _NAME_)
92#endif /* __DeclareSendRpc */
93
94#ifndef __BeforeSendRpc
95#define __BeforeSendRpc(_NUM_, _NAME_)
96#endif /* __BeforeSendRpc */
97
98#ifndef __AfterSendRpc
99#define __AfterSendRpc(_NUM_, _NAME_)
100#endif /* __AfterSendRpc */
101
102#ifndef __DeclareSendSimple
103#define __DeclareSendSimple(_NUM_, _NAME_)
104#endif /* __DeclareSendSimple */
105
106#ifndef __BeforeSendSimple
107#define __BeforeSendSimple(_NUM_, _NAME_)
108#endif /* __BeforeSendSimple */
109
110#ifndef __AfterSendSimple
111#define __AfterSendSimple(_NUM_, _NAME_)
112#endif /* __AfterSendSimple */
113
114#define msgh_request_port msgh_remote_port
115#define msgh_reply_port msgh_local_port
116
117
118
119#if ( __MigTypeCheck )
120#if __MIG_check__Reply__vfs_nspace_subsystem__
121#if !defined(__MIG_check__Reply__nspace_handle_t__defined)
122#define __MIG_check__Reply__nspace_handle_t__defined
123
124mig_internal kern_return_t __MIG_check__Reply__nspace_handle_t(__Reply__nspace_handle_t *Out0P)
125{
126
127 typedef __Reply__nspace_handle_t __Reply __attribute__((unused));
128#if __MigTypeCheck
129 unsigned int msgh_size;
130#endif /* __MigTypeCheck */
131 if (Out0P->Head.msgh_id != 867900) {
132 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
133 { return MIG_SERVER_DIED; }
134 else
135 { return MIG_REPLY_MISMATCH; }
136 }
137
138#if __MigTypeCheck
139 msgh_size = Out0P->Head.msgh_size;
140
141 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
142 ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
143 (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
144 Out0P->RetCode == KERN_SUCCESS)))
145 { return MIG_TYPE_ERROR ; }
146#endif /* __MigTypeCheck */
147
148#if __MigTypeCheck
149 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
150 return MIG_TYPE_ERROR;
151 }
152#endif /* __MigTypeCheck */
153 if (Out0P->RetCode != KERN_SUCCESS) {
154 return ((mig_reply_error_t *)Out0P)->RetCode;
155 }
156
157 return MACH_MSG_SUCCESS;
158}
159#endif /* !defined(__MIG_check__Reply__nspace_handle_t__defined) */
160#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
161#endif /* ( __MigTypeCheck ) */
162
163
164/* Routine nspace_handle */
165mig_external kern_return_t send_nspace_handle
166(
167 mach_port_t nspace_handler_port,
168 uint32_t pid,
169 vfs_path_t path,
170 int *handler_error
171)
172{
173
174#ifdef __MigPackStructs
175#pragma pack(push, 4)
176#endif
177 typedef struct {
178 mach_msg_header_t Head;
179 NDR_record_t NDR;
180 uint32_t pid;
181 vfs_path_t path;
182 } Request __attribute__((unused));
183#ifdef __MigPackStructs
184#pragma pack(pop)
185#endif
186
187#ifdef __MigPackStructs
188#pragma pack(push, 4)
189#endif
190 typedef struct {
191 mach_msg_header_t Head;
192 NDR_record_t NDR;
193 kern_return_t RetCode;
194 int handler_error;
195 mach_msg_trailer_t trailer;
196 } Reply __attribute__((unused));
197#ifdef __MigPackStructs
198#pragma pack(pop)
199#endif
200
201#ifdef __MigPackStructs
202#pragma pack(push, 4)
203#endif
204 typedef struct {
205 mach_msg_header_t Head;
206 NDR_record_t NDR;
207 kern_return_t RetCode;
208 int handler_error;
209 } __Reply __attribute__((unused));
210#ifdef __MigPackStructs
211#pragma pack(pop)
212#endif
213 /*
214 * typedef struct {
215 * mach_msg_header_t Head;
216 * NDR_record_t NDR;
217 * kern_return_t RetCode;
218 * } mig_reply_error_t;
219 */
220
221 union nspace_handleMessU {
222 Request In;
223 Reply Out;
224 } *Mess = (union nspace_handleMessU *) mig_user_allocate(size: sizeof(*Mess));
225
226 Request *InP = &Mess->In;
227 Reply *Out0P = &Mess->Out;
228
229 mach_msg_return_t msg_result;
230
231#ifdef __MIG_check__Reply__nspace_handle_t__defined
232 kern_return_t check_result;
233#endif /* __MIG_check__Reply__nspace_handle_t__defined */
234
235 __DeclareSendRpc(867800, "nspace_handle")
236
237 InP->NDR = NDR_record;
238
239 InP->pid = pid;
240
241#ifdef USING_MIG_STRNCPY_ZEROFILL
242 if (mig_strncpy_zerofill != NULL) {
243 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 4096);
244 } else {
245#endif /* USING_MIG_STRNCPY_ZEROFILL */
246 (void) mig_strncpy(dest: InP->path, src: path, len: 4096);
247#ifdef USING_MIG_STRNCPY_ZEROFILL
248 }
249#endif /* USING_MIG_STRNCPY_ZEROFILL */
250
251 InP->Head.msgh_reply_port = mig_get_reply_port();
252 InP->Head.msgh_bits =
253 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
254 /* msgh_size passed as argument */
255 InP->Head.msgh_request_port = nspace_handler_port;
256 InP->Head.msgh_id = 867800;
257 InP->Head.msgh_reserved = 0;
258
259 __BeforeSendRpc(867800, "nspace_handle")
260#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
261 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
262#else
263 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
264#endif /* __MigKernelSpecificCode */
265 __AfterSendRpc(867800, "nspace_handle")
266 if (msg_result != MACH_MSG_SUCCESS) {
267 __MachMsgErrorWithoutTimeout(msg_result);
268 }
269 if (msg_result != MACH_MSG_SUCCESS) {
270 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
271 }
272
273
274#if defined(__MIG_check__Reply__nspace_handle_t__defined)
275 check_result = __MIG_check__Reply__nspace_handle_t(Out0P: (__Reply__nspace_handle_t *)Out0P);
276 if (check_result != MACH_MSG_SUCCESS) {
277#if __MigKernelSpecificCode
278 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
279#endif /* __MigKernelSpecificCode */
280 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
281 }
282#endif /* defined(__MIG_check__Reply__nspace_handle_t__defined) */
283
284 *handler_error = Out0P->handler_error;
285
286 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
287}
288
289#if ( __MigTypeCheck )
290#if __MIG_check__Reply__vfs_nspace_subsystem__
291#if !defined(__MIG_check__Reply__nspace_resolve_cancel_t__defined)
292#define __MIG_check__Reply__nspace_resolve_cancel_t__defined
293
294mig_internal kern_return_t __MIG_check__Reply__nspace_resolve_cancel_t(__Reply__nspace_resolve_cancel_t *Out0P)
295{
296
297 typedef __Reply__nspace_resolve_cancel_t __Reply __attribute__((unused));
298 if (Out0P->Head.msgh_id != 867901) {
299 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
300 { return MIG_SERVER_DIED; }
301 else
302 { return MIG_REPLY_MISMATCH; }
303 }
304
305#if __MigTypeCheck
306 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
307 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
308 { return MIG_TYPE_ERROR ; }
309#endif /* __MigTypeCheck */
310
311#if __MigTypeCheck
312 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
313 return MIG_TYPE_ERROR;
314 }
315#endif /* __MigTypeCheck */
316 {
317 return Out0P->RetCode;
318 }
319}
320#endif /* !defined(__MIG_check__Reply__nspace_resolve_cancel_t__defined) */
321#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
322#endif /* ( __MigTypeCheck ) */
323
324
325/* Routine nspace_resolve_cancel */
326mig_external kern_return_t send_nspace_resolve_cancel
327(
328 mach_port_t nspace_handler_port,
329 uint32_t req_id
330)
331{
332
333#ifdef __MigPackStructs
334#pragma pack(push, 4)
335#endif
336 typedef struct {
337 mach_msg_header_t Head;
338 NDR_record_t NDR;
339 uint32_t req_id;
340 } Request __attribute__((unused));
341#ifdef __MigPackStructs
342#pragma pack(pop)
343#endif
344
345#ifdef __MigPackStructs
346#pragma pack(push, 4)
347#endif
348 typedef struct {
349 mach_msg_header_t Head;
350 NDR_record_t NDR;
351 kern_return_t RetCode;
352 mach_msg_trailer_t trailer;
353 } Reply __attribute__((unused));
354#ifdef __MigPackStructs
355#pragma pack(pop)
356#endif
357
358#ifdef __MigPackStructs
359#pragma pack(push, 4)
360#endif
361 typedef struct {
362 mach_msg_header_t Head;
363 NDR_record_t NDR;
364 kern_return_t RetCode;
365 } __Reply __attribute__((unused));
366#ifdef __MigPackStructs
367#pragma pack(pop)
368#endif
369 /*
370 * typedef struct {
371 * mach_msg_header_t Head;
372 * NDR_record_t NDR;
373 * kern_return_t RetCode;
374 * } mig_reply_error_t;
375 */
376
377 union {
378 Request In;
379 Reply Out;
380 } Mess;
381
382 Request *InP = &Mess.In;
383 Reply *Out0P = &Mess.Out;
384
385 mach_msg_return_t msg_result;
386
387#ifdef __MIG_check__Reply__nspace_resolve_cancel_t__defined
388 kern_return_t check_result;
389#endif /* __MIG_check__Reply__nspace_resolve_cancel_t__defined */
390
391 __DeclareSendRpc(867801, "nspace_resolve_cancel")
392
393 InP->NDR = NDR_record;
394
395 InP->req_id = req_id;
396
397 InP->Head.msgh_reply_port = mig_get_reply_port();
398 InP->Head.msgh_bits =
399 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
400 /* msgh_size passed as argument */
401 InP->Head.msgh_request_port = nspace_handler_port;
402 InP->Head.msgh_id = 867801;
403 InP->Head.msgh_reserved = 0;
404
405 __BeforeSendRpc(867801, "nspace_resolve_cancel")
406#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
407 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
408#else
409 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
410#endif /* __MigKernelSpecificCode */
411 __AfterSendRpc(867801, "nspace_resolve_cancel")
412 if (msg_result != MACH_MSG_SUCCESS) {
413 __MachMsgErrorWithoutTimeout(msg_result);
414 }
415 if (msg_result != MACH_MSG_SUCCESS) {
416 { return msg_result; }
417 }
418
419
420#if defined(__MIG_check__Reply__nspace_resolve_cancel_t__defined)
421 check_result = __MIG_check__Reply__nspace_resolve_cancel_t(Out0P: (__Reply__nspace_resolve_cancel_t *)Out0P);
422 if (check_result != MACH_MSG_SUCCESS) {
423#if __MigKernelSpecificCode
424 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
425#endif /* __MigKernelSpecificCode */
426 { return check_result; }
427 }
428#endif /* defined(__MIG_check__Reply__nspace_resolve_cancel_t__defined) */
429
430 return KERN_SUCCESS;
431}
432
433#if ( __MigTypeCheck )
434#if __MIG_check__Reply__vfs_nspace_subsystem__
435#if !defined(__MIG_check__Reply__nspace_resolve_path_t__defined)
436#define __MIG_check__Reply__nspace_resolve_path_t__defined
437
438mig_internal kern_return_t __MIG_check__Reply__nspace_resolve_path_t(__Reply__nspace_resolve_path_t *Out0P)
439{
440
441 typedef __Reply__nspace_resolve_path_t __Reply __attribute__((unused));
442#if __MigTypeCheck
443 unsigned int msgh_size;
444#endif /* __MigTypeCheck */
445 if (Out0P->Head.msgh_id != 867902) {
446 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
447 { return MIG_SERVER_DIED; }
448 else
449 { return MIG_REPLY_MISMATCH; }
450 }
451
452#if __MigTypeCheck
453 msgh_size = Out0P->Head.msgh_size;
454
455 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
456 ((msgh_size != (mach_msg_size_t)sizeof(__Reply)) &&
457 (msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
458 Out0P->RetCode == KERN_SUCCESS)))
459 { return MIG_TYPE_ERROR ; }
460#endif /* __MigTypeCheck */
461
462#if __MigTypeCheck
463 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
464 return MIG_TYPE_ERROR;
465 }
466#endif /* __MigTypeCheck */
467 if (Out0P->RetCode != KERN_SUCCESS) {
468 return ((mig_reply_error_t *)Out0P)->RetCode;
469 }
470
471 return MACH_MSG_SUCCESS;
472}
473#endif /* !defined(__MIG_check__Reply__nspace_resolve_path_t__defined) */
474#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
475#endif /* ( __MigTypeCheck ) */
476
477
478/* Routine nspace_resolve_path */
479mig_external kern_return_t send_nspace_resolve_path
480(
481 mach_port_t nspace_handler_port,
482 uint32_t req_id,
483 uint32_t pid,
484 uint32_t op,
485 nspace_path_t path,
486 int *xxx_rdar44371223
487)
488{
489
490#ifdef __MigPackStructs
491#pragma pack(push, 4)
492#endif
493 typedef struct {
494 mach_msg_header_t Head;
495 NDR_record_t NDR;
496 uint32_t req_id;
497 uint32_t pid;
498 uint32_t op;
499 nspace_path_t path;
500 } Request __attribute__((unused));
501#ifdef __MigPackStructs
502#pragma pack(pop)
503#endif
504
505#ifdef __MigPackStructs
506#pragma pack(push, 4)
507#endif
508 typedef struct {
509 mach_msg_header_t Head;
510 NDR_record_t NDR;
511 kern_return_t RetCode;
512 int xxx_rdar44371223;
513 mach_msg_trailer_t trailer;
514 } Reply __attribute__((unused));
515#ifdef __MigPackStructs
516#pragma pack(pop)
517#endif
518
519#ifdef __MigPackStructs
520#pragma pack(push, 4)
521#endif
522 typedef struct {
523 mach_msg_header_t Head;
524 NDR_record_t NDR;
525 kern_return_t RetCode;
526 int xxx_rdar44371223;
527 } __Reply __attribute__((unused));
528#ifdef __MigPackStructs
529#pragma pack(pop)
530#endif
531 /*
532 * typedef struct {
533 * mach_msg_header_t Head;
534 * NDR_record_t NDR;
535 * kern_return_t RetCode;
536 * } mig_reply_error_t;
537 */
538
539 union nspace_resolve_pathMessU {
540 Request In;
541 Reply Out;
542 } *Mess = (union nspace_resolve_pathMessU *) mig_user_allocate(size: sizeof(*Mess));
543
544 Request *InP = &Mess->In;
545 Reply *Out0P = &Mess->Out;
546
547 mach_msg_return_t msg_result;
548
549#ifdef __MIG_check__Reply__nspace_resolve_path_t__defined
550 kern_return_t check_result;
551#endif /* __MIG_check__Reply__nspace_resolve_path_t__defined */
552
553 __DeclareSendRpc(867802, "nspace_resolve_path")
554
555 InP->NDR = NDR_record;
556
557 InP->req_id = req_id;
558
559 InP->pid = pid;
560
561 InP->op = op;
562
563#ifdef USING_MIG_STRNCPY_ZEROFILL
564 if (mig_strncpy_zerofill != NULL) {
565 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
566 } else {
567#endif /* USING_MIG_STRNCPY_ZEROFILL */
568 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
569#ifdef USING_MIG_STRNCPY_ZEROFILL
570 }
571#endif /* USING_MIG_STRNCPY_ZEROFILL */
572
573 InP->Head.msgh_reply_port = mig_get_reply_port();
574 InP->Head.msgh_bits =
575 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
576 /* msgh_size passed as argument */
577 InP->Head.msgh_request_port = nspace_handler_port;
578 InP->Head.msgh_id = 867802;
579 InP->Head.msgh_reserved = 0;
580
581 __BeforeSendRpc(867802, "nspace_resolve_path")
582#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
583 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
584#else
585 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
586#endif /* __MigKernelSpecificCode */
587 __AfterSendRpc(867802, "nspace_resolve_path")
588 if (msg_result != MACH_MSG_SUCCESS) {
589 __MachMsgErrorWithoutTimeout(msg_result);
590 }
591 if (msg_result != MACH_MSG_SUCCESS) {
592 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
593 }
594
595
596#if defined(__MIG_check__Reply__nspace_resolve_path_t__defined)
597 check_result = __MIG_check__Reply__nspace_resolve_path_t(Out0P: (__Reply__nspace_resolve_path_t *)Out0P);
598 if (check_result != MACH_MSG_SUCCESS) {
599#if __MigKernelSpecificCode
600 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
601#endif /* __MigKernelSpecificCode */
602 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
603 }
604#endif /* defined(__MIG_check__Reply__nspace_resolve_path_t__defined) */
605
606 *xxx_rdar44371223 = Out0P->xxx_rdar44371223;
607
608 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
609}
610
611#if ( __MigTypeCheck )
612#if __MIG_check__Reply__vfs_nspace_subsystem__
613#if !defined(__MIG_check__Reply__vfs_resolve_file_t__defined)
614#define __MIG_check__Reply__vfs_resolve_file_t__defined
615
616mig_internal kern_return_t __MIG_check__Reply__vfs_resolve_file_t(__Reply__vfs_resolve_file_t *Out0P)
617{
618
619 typedef __Reply__vfs_resolve_file_t __Reply __attribute__((unused));
620 if (Out0P->Head.msgh_id != 867903) {
621 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
622 { return MIG_SERVER_DIED; }
623 else
624 { return MIG_REPLY_MISMATCH; }
625 }
626
627#if __MigTypeCheck
628 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
629 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
630 { return MIG_TYPE_ERROR ; }
631#endif /* __MigTypeCheck */
632
633#if __MigTypeCheck
634 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
635 return MIG_TYPE_ERROR;
636 }
637#endif /* __MigTypeCheck */
638 {
639 kern_return_t ReturnValue;
640 ReturnValue = Out0P->RetCode;
641 return ReturnValue;
642 }
643}
644#endif /* !defined(__MIG_check__Reply__vfs_resolve_file_t__defined) */
645#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
646#endif /* ( __MigTypeCheck ) */
647
648
649/* Routine vfs_resolve_file */
650mig_external kern_return_t send_vfs_resolve_file
651(
652 mach_port_t nspace_handler_port,
653 uint32_t req_id,
654 uint32_t pid,
655 uint32_t op,
656 int64_t offset,
657 int64_t size,
658 nspace_path_t path
659)
660{
661
662#ifdef __MigPackStructs
663#pragma pack(push, 4)
664#endif
665 typedef struct {
666 mach_msg_header_t Head;
667 NDR_record_t NDR;
668 uint32_t req_id;
669 uint32_t pid;
670 uint32_t op;
671 int64_t offset;
672 int64_t size;
673 nspace_path_t path;
674 } Request __attribute__((unused));
675#ifdef __MigPackStructs
676#pragma pack(pop)
677#endif
678
679#ifdef __MigPackStructs
680#pragma pack(push, 4)
681#endif
682 typedef struct {
683 mach_msg_header_t Head;
684 NDR_record_t NDR;
685 kern_return_t RetCode;
686 mach_msg_trailer_t trailer;
687 } Reply __attribute__((unused));
688#ifdef __MigPackStructs
689#pragma pack(pop)
690#endif
691
692#ifdef __MigPackStructs
693#pragma pack(push, 4)
694#endif
695 typedef struct {
696 mach_msg_header_t Head;
697 NDR_record_t NDR;
698 kern_return_t RetCode;
699 } __Reply __attribute__((unused));
700#ifdef __MigPackStructs
701#pragma pack(pop)
702#endif
703 /*
704 * typedef struct {
705 * mach_msg_header_t Head;
706 * NDR_record_t NDR;
707 * kern_return_t RetCode;
708 * } mig_reply_error_t;
709 */
710
711 union vfs_resolve_fileMessU {
712 Request In;
713 Reply Out;
714 } *Mess = (union vfs_resolve_fileMessU *) mig_user_allocate(size: sizeof(*Mess));
715
716 Request *InP = &Mess->In;
717 Reply *Out0P = &Mess->Out;
718
719 mach_msg_return_t msg_result;
720
721#ifdef __MIG_check__Reply__vfs_resolve_file_t__defined
722 kern_return_t check_result;
723#endif /* __MIG_check__Reply__vfs_resolve_file_t__defined */
724
725 __DeclareSendRpc(867803, "vfs_resolve_file")
726
727 InP->NDR = NDR_record;
728
729 InP->req_id = req_id;
730
731 InP->pid = pid;
732
733 InP->op = op;
734
735 InP->offset = offset;
736
737 InP->size = size;
738
739#ifdef USING_MIG_STRNCPY_ZEROFILL
740 if (mig_strncpy_zerofill != NULL) {
741 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
742 } else {
743#endif /* USING_MIG_STRNCPY_ZEROFILL */
744 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
745#ifdef USING_MIG_STRNCPY_ZEROFILL
746 }
747#endif /* USING_MIG_STRNCPY_ZEROFILL */
748
749 InP->Head.msgh_reply_port = mig_get_reply_port();
750 InP->Head.msgh_bits =
751 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
752 /* msgh_size passed as argument */
753 InP->Head.msgh_request_port = nspace_handler_port;
754 InP->Head.msgh_id = 867803;
755 InP->Head.msgh_reserved = 0;
756
757 __BeforeSendRpc(867803, "vfs_resolve_file")
758#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
759 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
760#else
761 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
762#endif /* __MigKernelSpecificCode */
763 __AfterSendRpc(867803, "vfs_resolve_file")
764 if (msg_result != MACH_MSG_SUCCESS) {
765 __MachMsgErrorWithoutTimeout(msg_result);
766 }
767 if (msg_result != MACH_MSG_SUCCESS) {
768 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
769 }
770
771
772#if defined(__MIG_check__Reply__vfs_resolve_file_t__defined)
773 check_result = __MIG_check__Reply__vfs_resolve_file_t(Out0P: (__Reply__vfs_resolve_file_t *)Out0P);
774 if (check_result != MACH_MSG_SUCCESS) {
775#if __MigKernelSpecificCode
776 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
777#endif /* __MigKernelSpecificCode */
778 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
779 }
780#endif /* defined(__MIG_check__Reply__vfs_resolve_file_t__defined) */
781
782 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
783}
784
785#if ( __MigTypeCheck )
786#if __MIG_check__Reply__vfs_nspace_subsystem__
787#if !defined(__MIG_check__Reply__vfs_resolve_dir_t__defined)
788#define __MIG_check__Reply__vfs_resolve_dir_t__defined
789
790mig_internal kern_return_t __MIG_check__Reply__vfs_resolve_dir_t(__Reply__vfs_resolve_dir_t *Out0P)
791{
792
793 typedef __Reply__vfs_resolve_dir_t __Reply __attribute__((unused));
794 if (Out0P->Head.msgh_id != 867904) {
795 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
796 { return MIG_SERVER_DIED; }
797 else
798 { return MIG_REPLY_MISMATCH; }
799 }
800
801#if __MigTypeCheck
802 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
803 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
804 { return MIG_TYPE_ERROR ; }
805#endif /* __MigTypeCheck */
806
807#if __MigTypeCheck
808 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
809 return MIG_TYPE_ERROR;
810 }
811#endif /* __MigTypeCheck */
812 {
813 kern_return_t ReturnValue;
814 ReturnValue = Out0P->RetCode;
815 return ReturnValue;
816 }
817}
818#endif /* !defined(__MIG_check__Reply__vfs_resolve_dir_t__defined) */
819#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
820#endif /* ( __MigTypeCheck ) */
821
822
823/* Routine vfs_resolve_dir */
824mig_external kern_return_t send_vfs_resolve_dir
825(
826 mach_port_t nspace_handler_port,
827 uint32_t req_id,
828 uint32_t pid,
829 uint32_t op,
830 nspace_name_t file_name,
831 nspace_path_t path
832)
833{
834
835#ifdef __MigPackStructs
836#pragma pack(push, 4)
837#endif
838 typedef struct {
839 mach_msg_header_t Head;
840 NDR_record_t NDR;
841 uint32_t req_id;
842 uint32_t pid;
843 uint32_t op;
844 nspace_name_t file_name;
845 nspace_path_t path;
846 } Request __attribute__((unused));
847#ifdef __MigPackStructs
848#pragma pack(pop)
849#endif
850
851#ifdef __MigPackStructs
852#pragma pack(push, 4)
853#endif
854 typedef struct {
855 mach_msg_header_t Head;
856 NDR_record_t NDR;
857 kern_return_t RetCode;
858 mach_msg_trailer_t trailer;
859 } Reply __attribute__((unused));
860#ifdef __MigPackStructs
861#pragma pack(pop)
862#endif
863
864#ifdef __MigPackStructs
865#pragma pack(push, 4)
866#endif
867 typedef struct {
868 mach_msg_header_t Head;
869 NDR_record_t NDR;
870 kern_return_t RetCode;
871 } __Reply __attribute__((unused));
872#ifdef __MigPackStructs
873#pragma pack(pop)
874#endif
875 /*
876 * typedef struct {
877 * mach_msg_header_t Head;
878 * NDR_record_t NDR;
879 * kern_return_t RetCode;
880 * } mig_reply_error_t;
881 */
882
883 union vfs_resolve_dirMessU {
884 Request In;
885 Reply Out;
886 } *Mess = (union vfs_resolve_dirMessU *) mig_user_allocate(size: sizeof(*Mess));
887
888 Request *InP = &Mess->In;
889 Reply *Out0P = &Mess->Out;
890
891 mach_msg_return_t msg_result;
892
893#ifdef __MIG_check__Reply__vfs_resolve_dir_t__defined
894 kern_return_t check_result;
895#endif /* __MIG_check__Reply__vfs_resolve_dir_t__defined */
896
897 __DeclareSendRpc(867804, "vfs_resolve_dir")
898
899 InP->NDR = NDR_record;
900
901 InP->req_id = req_id;
902
903 InP->pid = pid;
904
905 InP->op = op;
906
907#ifdef USING_MIG_STRNCPY_ZEROFILL
908 if (mig_strncpy_zerofill != NULL) {
909 (void) mig_strncpy_zerofill(dest: InP->file_name, src: file_name, len: 8192);
910 } else {
911#endif /* USING_MIG_STRNCPY_ZEROFILL */
912 (void) mig_strncpy(dest: InP->file_name, src: file_name, len: 8192);
913#ifdef USING_MIG_STRNCPY_ZEROFILL
914 }
915#endif /* USING_MIG_STRNCPY_ZEROFILL */
916
917#ifdef USING_MIG_STRNCPY_ZEROFILL
918 if (mig_strncpy_zerofill != NULL) {
919 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
920 } else {
921#endif /* USING_MIG_STRNCPY_ZEROFILL */
922 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
923#ifdef USING_MIG_STRNCPY_ZEROFILL
924 }
925#endif /* USING_MIG_STRNCPY_ZEROFILL */
926
927 InP->Head.msgh_reply_port = mig_get_reply_port();
928 InP->Head.msgh_bits =
929 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
930 /* msgh_size passed as argument */
931 InP->Head.msgh_request_port = nspace_handler_port;
932 InP->Head.msgh_id = 867804;
933 InP->Head.msgh_reserved = 0;
934
935 __BeforeSendRpc(867804, "vfs_resolve_dir")
936#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
937 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
938#else
939 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
940#endif /* __MigKernelSpecificCode */
941 __AfterSendRpc(867804, "vfs_resolve_dir")
942 if (msg_result != MACH_MSG_SUCCESS) {
943 __MachMsgErrorWithoutTimeout(msg_result);
944 }
945 if (msg_result != MACH_MSG_SUCCESS) {
946 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
947 }
948
949
950#if defined(__MIG_check__Reply__vfs_resolve_dir_t__defined)
951 check_result = __MIG_check__Reply__vfs_resolve_dir_t(Out0P: (__Reply__vfs_resolve_dir_t *)Out0P);
952 if (check_result != MACH_MSG_SUCCESS) {
953#if __MigKernelSpecificCode
954 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
955#endif /* __MigKernelSpecificCode */
956 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
957 }
958#endif /* defined(__MIG_check__Reply__vfs_resolve_dir_t__defined) */
959
960 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
961}
962
963#if ( __MigTypeCheck )
964#if __MIG_check__Reply__vfs_nspace_subsystem__
965#if !defined(__MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined)
966#define __MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined
967
968mig_internal kern_return_t __MIG_check__Reply__vfs_resolve_file_with_audit_token_t(__Reply__vfs_resolve_file_with_audit_token_t *Out0P)
969{
970
971 typedef __Reply__vfs_resolve_file_with_audit_token_t __Reply __attribute__((unused));
972 if (Out0P->Head.msgh_id != 867905) {
973 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
974 { return MIG_SERVER_DIED; }
975 else
976 { return MIG_REPLY_MISMATCH; }
977 }
978
979#if __MigTypeCheck
980 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
981 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
982 { return MIG_TYPE_ERROR ; }
983#endif /* __MigTypeCheck */
984
985#if __MigTypeCheck
986 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
987 return MIG_TYPE_ERROR;
988 }
989#endif /* __MigTypeCheck */
990 {
991 kern_return_t ReturnValue;
992 ReturnValue = Out0P->RetCode;
993 return ReturnValue;
994 }
995}
996#endif /* !defined(__MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined) */
997#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
998#endif /* ( __MigTypeCheck ) */
999
1000
1001/* Routine vfs_resolve_file_with_audit_token */
1002mig_external kern_return_t send_vfs_resolve_file_with_audit_token
1003(
1004 mach_port_t nspace_handler_port,
1005 uint32_t req_id,
1006 uint32_t op,
1007 int64_t offset,
1008 int64_t size,
1009 nspace_path_t path,
1010 audit_token_t req_atoken
1011)
1012{
1013
1014#ifdef __MigPackStructs
1015#pragma pack(push, 4)
1016#endif
1017 typedef struct {
1018 mach_msg_header_t Head;
1019 NDR_record_t NDR;
1020 uint32_t req_id;
1021 uint32_t op;
1022 int64_t offset;
1023 int64_t size;
1024 nspace_path_t path;
1025 audit_token_t req_atoken;
1026 } Request __attribute__((unused));
1027#ifdef __MigPackStructs
1028#pragma pack(pop)
1029#endif
1030
1031#ifdef __MigPackStructs
1032#pragma pack(push, 4)
1033#endif
1034 typedef struct {
1035 mach_msg_header_t Head;
1036 NDR_record_t NDR;
1037 kern_return_t RetCode;
1038 mach_msg_trailer_t trailer;
1039 } Reply __attribute__((unused));
1040#ifdef __MigPackStructs
1041#pragma pack(pop)
1042#endif
1043
1044#ifdef __MigPackStructs
1045#pragma pack(push, 4)
1046#endif
1047 typedef struct {
1048 mach_msg_header_t Head;
1049 NDR_record_t NDR;
1050 kern_return_t RetCode;
1051 } __Reply __attribute__((unused));
1052#ifdef __MigPackStructs
1053#pragma pack(pop)
1054#endif
1055 /*
1056 * typedef struct {
1057 * mach_msg_header_t Head;
1058 * NDR_record_t NDR;
1059 * kern_return_t RetCode;
1060 * } mig_reply_error_t;
1061 */
1062
1063 union vfs_resolve_file_with_audit_tokenMessU {
1064 Request In;
1065 Reply Out;
1066 } *Mess = (union vfs_resolve_file_with_audit_tokenMessU *) mig_user_allocate(size: sizeof(*Mess));
1067
1068 Request *InP = &Mess->In;
1069 Reply *Out0P = &Mess->Out;
1070
1071 mach_msg_return_t msg_result;
1072
1073#ifdef __MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined
1074 kern_return_t check_result;
1075#endif /* __MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined */
1076
1077 __DeclareSendRpc(867805, "vfs_resolve_file_with_audit_token")
1078
1079 InP->NDR = NDR_record;
1080
1081 InP->req_id = req_id;
1082
1083 InP->op = op;
1084
1085 InP->offset = offset;
1086
1087 InP->size = size;
1088
1089#ifdef USING_MIG_STRNCPY_ZEROFILL
1090 if (mig_strncpy_zerofill != NULL) {
1091 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
1092 } else {
1093#endif /* USING_MIG_STRNCPY_ZEROFILL */
1094 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
1095#ifdef USING_MIG_STRNCPY_ZEROFILL
1096 }
1097#endif /* USING_MIG_STRNCPY_ZEROFILL */
1098
1099 InP->req_atoken = req_atoken;
1100
1101 InP->Head.msgh_reply_port = mig_get_reply_port();
1102 InP->Head.msgh_bits =
1103 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
1104 /* msgh_size passed as argument */
1105 InP->Head.msgh_request_port = nspace_handler_port;
1106 InP->Head.msgh_id = 867805;
1107 InP->Head.msgh_reserved = 0;
1108
1109 __BeforeSendRpc(867805, "vfs_resolve_file_with_audit_token")
1110#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
1111 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
1112#else
1113 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1114#endif /* __MigKernelSpecificCode */
1115 __AfterSendRpc(867805, "vfs_resolve_file_with_audit_token")
1116 if (msg_result != MACH_MSG_SUCCESS) {
1117 __MachMsgErrorWithoutTimeout(msg_result);
1118 }
1119 if (msg_result != MACH_MSG_SUCCESS) {
1120 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
1121 }
1122
1123
1124#if defined(__MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined)
1125 check_result = __MIG_check__Reply__vfs_resolve_file_with_audit_token_t(Out0P: (__Reply__vfs_resolve_file_with_audit_token_t *)Out0P);
1126 if (check_result != MACH_MSG_SUCCESS) {
1127#if __MigKernelSpecificCode
1128 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
1129#endif /* __MigKernelSpecificCode */
1130 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
1131 }
1132#endif /* defined(__MIG_check__Reply__vfs_resolve_file_with_audit_token_t__defined) */
1133
1134 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
1135}
1136
1137#if ( __MigTypeCheck )
1138#if __MIG_check__Reply__vfs_nspace_subsystem__
1139#if !defined(__MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined)
1140#define __MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined
1141
1142mig_internal kern_return_t __MIG_check__Reply__vfs_resolve_dir_with_audit_token_t(__Reply__vfs_resolve_dir_with_audit_token_t *Out0P)
1143{
1144
1145 typedef __Reply__vfs_resolve_dir_with_audit_token_t __Reply __attribute__((unused));
1146 if (Out0P->Head.msgh_id != 867906) {
1147 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
1148 { return MIG_SERVER_DIED; }
1149 else
1150 { return MIG_REPLY_MISMATCH; }
1151 }
1152
1153#if __MigTypeCheck
1154 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1155 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
1156 { return MIG_TYPE_ERROR ; }
1157#endif /* __MigTypeCheck */
1158
1159#if __MigTypeCheck
1160 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
1161 return MIG_TYPE_ERROR;
1162 }
1163#endif /* __MigTypeCheck */
1164 {
1165 kern_return_t ReturnValue;
1166 ReturnValue = Out0P->RetCode;
1167 return ReturnValue;
1168 }
1169}
1170#endif /* !defined(__MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined) */
1171#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
1172#endif /* ( __MigTypeCheck ) */
1173
1174
1175/* Routine vfs_resolve_dir_with_audit_token */
1176mig_external kern_return_t send_vfs_resolve_dir_with_audit_token
1177(
1178 mach_port_t nspace_handler_port,
1179 uint32_t req_id,
1180 uint32_t op,
1181 nspace_name_t file_name,
1182 nspace_path_t path,
1183 audit_token_t req_atoken
1184)
1185{
1186
1187#ifdef __MigPackStructs
1188#pragma pack(push, 4)
1189#endif
1190 typedef struct {
1191 mach_msg_header_t Head;
1192 NDR_record_t NDR;
1193 uint32_t req_id;
1194 uint32_t op;
1195 nspace_name_t file_name;
1196 nspace_path_t path;
1197 audit_token_t req_atoken;
1198 } Request __attribute__((unused));
1199#ifdef __MigPackStructs
1200#pragma pack(pop)
1201#endif
1202
1203#ifdef __MigPackStructs
1204#pragma pack(push, 4)
1205#endif
1206 typedef struct {
1207 mach_msg_header_t Head;
1208 NDR_record_t NDR;
1209 kern_return_t RetCode;
1210 mach_msg_trailer_t trailer;
1211 } Reply __attribute__((unused));
1212#ifdef __MigPackStructs
1213#pragma pack(pop)
1214#endif
1215
1216#ifdef __MigPackStructs
1217#pragma pack(push, 4)
1218#endif
1219 typedef struct {
1220 mach_msg_header_t Head;
1221 NDR_record_t NDR;
1222 kern_return_t RetCode;
1223 } __Reply __attribute__((unused));
1224#ifdef __MigPackStructs
1225#pragma pack(pop)
1226#endif
1227 /*
1228 * typedef struct {
1229 * mach_msg_header_t Head;
1230 * NDR_record_t NDR;
1231 * kern_return_t RetCode;
1232 * } mig_reply_error_t;
1233 */
1234
1235 union vfs_resolve_dir_with_audit_tokenMessU {
1236 Request In;
1237 Reply Out;
1238 } *Mess = (union vfs_resolve_dir_with_audit_tokenMessU *) mig_user_allocate(size: sizeof(*Mess));
1239
1240 Request *InP = &Mess->In;
1241 Reply *Out0P = &Mess->Out;
1242
1243 mach_msg_return_t msg_result;
1244
1245#ifdef __MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined
1246 kern_return_t check_result;
1247#endif /* __MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined */
1248
1249 __DeclareSendRpc(867806, "vfs_resolve_dir_with_audit_token")
1250
1251 InP->NDR = NDR_record;
1252
1253 InP->req_id = req_id;
1254
1255 InP->op = op;
1256
1257#ifdef USING_MIG_STRNCPY_ZEROFILL
1258 if (mig_strncpy_zerofill != NULL) {
1259 (void) mig_strncpy_zerofill(dest: InP->file_name, src: file_name, len: 8192);
1260 } else {
1261#endif /* USING_MIG_STRNCPY_ZEROFILL */
1262 (void) mig_strncpy(dest: InP->file_name, src: file_name, len: 8192);
1263#ifdef USING_MIG_STRNCPY_ZEROFILL
1264 }
1265#endif /* USING_MIG_STRNCPY_ZEROFILL */
1266
1267#ifdef USING_MIG_STRNCPY_ZEROFILL
1268 if (mig_strncpy_zerofill != NULL) {
1269 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
1270 } else {
1271#endif /* USING_MIG_STRNCPY_ZEROFILL */
1272 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
1273#ifdef USING_MIG_STRNCPY_ZEROFILL
1274 }
1275#endif /* USING_MIG_STRNCPY_ZEROFILL */
1276
1277 InP->req_atoken = req_atoken;
1278
1279 InP->Head.msgh_reply_port = mig_get_reply_port();
1280 InP->Head.msgh_bits =
1281 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
1282 /* msgh_size passed as argument */
1283 InP->Head.msgh_request_port = nspace_handler_port;
1284 InP->Head.msgh_id = 867806;
1285 InP->Head.msgh_reserved = 0;
1286
1287 __BeforeSendRpc(867806, "vfs_resolve_dir_with_audit_token")
1288#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
1289 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
1290#else
1291 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1292#endif /* __MigKernelSpecificCode */
1293 __AfterSendRpc(867806, "vfs_resolve_dir_with_audit_token")
1294 if (msg_result != MACH_MSG_SUCCESS) {
1295 __MachMsgErrorWithoutTimeout(msg_result);
1296 }
1297 if (msg_result != MACH_MSG_SUCCESS) {
1298 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
1299 }
1300
1301
1302#if defined(__MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined)
1303 check_result = __MIG_check__Reply__vfs_resolve_dir_with_audit_token_t(Out0P: (__Reply__vfs_resolve_dir_with_audit_token_t *)Out0P);
1304 if (check_result != MACH_MSG_SUCCESS) {
1305#if __MigKernelSpecificCode
1306 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
1307#endif /* __MigKernelSpecificCode */
1308 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
1309 }
1310#endif /* defined(__MIG_check__Reply__vfs_resolve_dir_with_audit_token_t__defined) */
1311
1312 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
1313}
1314
1315#if ( __MigTypeCheck )
1316#if __MIG_check__Reply__vfs_nspace_subsystem__
1317#if !defined(__MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined)
1318#define __MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined
1319
1320mig_internal kern_return_t __MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t(__Reply__vfs_resolve_reparent_with_audit_token_t *Out0P)
1321{
1322
1323 typedef __Reply__vfs_resolve_reparent_with_audit_token_t __Reply __attribute__((unused));
1324 if (Out0P->Head.msgh_id != 867907) {
1325 if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
1326 { return MIG_SERVER_DIED; }
1327 else
1328 { return MIG_REPLY_MISMATCH; }
1329 }
1330
1331#if __MigTypeCheck
1332 if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1333 (Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
1334 { return MIG_TYPE_ERROR ; }
1335#endif /* __MigTypeCheck */
1336
1337#if __MigTypeCheck
1338 if (Out0P->Head.msgh_request_port != MACH_PORT_NULL) {
1339 return MIG_TYPE_ERROR;
1340 }
1341#endif /* __MigTypeCheck */
1342 {
1343 kern_return_t ReturnValue;
1344 ReturnValue = Out0P->RetCode;
1345 return ReturnValue;
1346 }
1347}
1348#endif /* !defined(__MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined) */
1349#endif /* __MIG_check__Reply__vfs_nspace_subsystem__ */
1350#endif /* ( __MigTypeCheck ) */
1351
1352
1353/* Routine vfs_resolve_reparent_with_audit_token */
1354mig_external kern_return_t send_vfs_resolve_reparent_with_audit_token
1355(
1356 mach_port_t nspace_handler_port,
1357 uint32_t req_id,
1358 uint32_t op,
1359 nspace_path_t path,
1360 nspace_path_t dest_path,
1361 audit_token_t req_atoken
1362)
1363{
1364
1365#ifdef __MigPackStructs
1366#pragma pack(push, 4)
1367#endif
1368 typedef struct {
1369 mach_msg_header_t Head;
1370 NDR_record_t NDR;
1371 uint32_t req_id;
1372 uint32_t op;
1373 nspace_path_t path;
1374 nspace_path_t dest_path;
1375 audit_token_t req_atoken;
1376 } Request __attribute__((unused));
1377#ifdef __MigPackStructs
1378#pragma pack(pop)
1379#endif
1380
1381#ifdef __MigPackStructs
1382#pragma pack(push, 4)
1383#endif
1384 typedef struct {
1385 mach_msg_header_t Head;
1386 NDR_record_t NDR;
1387 kern_return_t RetCode;
1388 mach_msg_trailer_t trailer;
1389 } Reply __attribute__((unused));
1390#ifdef __MigPackStructs
1391#pragma pack(pop)
1392#endif
1393
1394#ifdef __MigPackStructs
1395#pragma pack(push, 4)
1396#endif
1397 typedef struct {
1398 mach_msg_header_t Head;
1399 NDR_record_t NDR;
1400 kern_return_t RetCode;
1401 } __Reply __attribute__((unused));
1402#ifdef __MigPackStructs
1403#pragma pack(pop)
1404#endif
1405 /*
1406 * typedef struct {
1407 * mach_msg_header_t Head;
1408 * NDR_record_t NDR;
1409 * kern_return_t RetCode;
1410 * } mig_reply_error_t;
1411 */
1412
1413 union vfs_resolve_reparent_with_audit_tokenMessU {
1414 Request In;
1415 Reply Out;
1416 } *Mess = (union vfs_resolve_reparent_with_audit_tokenMessU *) mig_user_allocate(size: sizeof(*Mess));
1417
1418 Request *InP = &Mess->In;
1419 Reply *Out0P = &Mess->Out;
1420
1421 mach_msg_return_t msg_result;
1422
1423#ifdef __MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined
1424 kern_return_t check_result;
1425#endif /* __MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined */
1426
1427 __DeclareSendRpc(867807, "vfs_resolve_reparent_with_audit_token")
1428
1429 InP->NDR = NDR_record;
1430
1431 InP->req_id = req_id;
1432
1433 InP->op = op;
1434
1435#ifdef USING_MIG_STRNCPY_ZEROFILL
1436 if (mig_strncpy_zerofill != NULL) {
1437 (void) mig_strncpy_zerofill(dest: InP->path, src: path, len: 8192);
1438 } else {
1439#endif /* USING_MIG_STRNCPY_ZEROFILL */
1440 (void) mig_strncpy(dest: InP->path, src: path, len: 8192);
1441#ifdef USING_MIG_STRNCPY_ZEROFILL
1442 }
1443#endif /* USING_MIG_STRNCPY_ZEROFILL */
1444
1445#ifdef USING_MIG_STRNCPY_ZEROFILL
1446 if (mig_strncpy_zerofill != NULL) {
1447 (void) mig_strncpy_zerofill(dest: InP->dest_path, src: dest_path, len: 8192);
1448 } else {
1449#endif /* USING_MIG_STRNCPY_ZEROFILL */
1450 (void) mig_strncpy(dest: InP->dest_path, src: dest_path, len: 8192);
1451#ifdef USING_MIG_STRNCPY_ZEROFILL
1452 }
1453#endif /* USING_MIG_STRNCPY_ZEROFILL */
1454
1455 InP->req_atoken = req_atoken;
1456
1457 InP->Head.msgh_reply_port = mig_get_reply_port();
1458 InP->Head.msgh_bits =
1459 MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
1460 /* msgh_size passed as argument */
1461 InP->Head.msgh_request_port = nspace_handler_port;
1462 InP->Head.msgh_id = 867807;
1463 InP->Head.msgh_reserved = 0;
1464
1465 __BeforeSendRpc(867807, "vfs_resolve_reparent_with_audit_token")
1466#if (__MigKernelSpecificCode) || (_MIG_KERNELSPECIFIC_CODE_)
1467 msg_result = mach_msg_rpc_from_kernel(msg: &InP->Head, send_size: (mach_msg_size_t)sizeof(Request), rcv_size: (mach_msg_size_t)sizeof(Reply));
1468#else
1469 msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1470#endif /* __MigKernelSpecificCode */
1471 __AfterSendRpc(867807, "vfs_resolve_reparent_with_audit_token")
1472 if (msg_result != MACH_MSG_SUCCESS) {
1473 __MachMsgErrorWithoutTimeout(msg_result);
1474 }
1475 if (msg_result != MACH_MSG_SUCCESS) {
1476 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return msg_result; }
1477 }
1478
1479
1480#if defined(__MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined)
1481 check_result = __MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t(Out0P: (__Reply__vfs_resolve_reparent_with_audit_token_t *)Out0P);
1482 if (check_result != MACH_MSG_SUCCESS) {
1483#if __MigKernelSpecificCode
1484 mach_msg_destroy_from_kernel(msg: &Out0P->Head);
1485#endif /* __MigKernelSpecificCode */
1486 { mig_user_deallocate(data: (char *) Mess, size: (mach_msg_size_t)sizeof(*Mess)); return check_result; }
1487 }
1488#endif /* defined(__MIG_check__Reply__vfs_resolve_reparent_with_audit_token_t__defined) */
1489
1490 { mig_user_deallocate(data: (char *) Mess, size: sizeof(*Mess)); return KERN_SUCCESS; }
1491}
1492