Chameleon

Chameleon Svn Source Tree

Root/trunk/i386/include/mach/host_security.h

1#ifndef_host_security_user_
2#define_host_security_user_
3
4/* Module host_security */
5
6#include <string.h>
7#include <mach/ndr.h>
8#include <mach/boolean.h>
9#include <mach/kern_return.h>
10#include <mach/notify.h>
11#include <mach/mach_types.h>
12#include <mach/message.h>
13#include <mach/mig_errors.h>
14#include <mach/port.h>
15
16#ifdef AUTOTEST
17#ifndef FUNCTION_PTR_T
18#define FUNCTION_PTR_T
19typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
20typedef struct {
21 char *name;
22 function_ptr_t function;
23} function_table_entry;
24typedef function_table_entry *function_table_t;
25#endif /* FUNCTION_PTR_T */
26#endif /* AUTOTEST */
27
28#ifndefhost_security_MSG_COUNT
29#definehost_security_MSG_COUNT2
30#endif/* host_security_MSG_COUNT */
31
32#include <mach/std_types.h>
33#include <mach/mig.h>
34#include <mach/mach_types.h>
35
36#ifdef __BeforeMigUserHeader
37__BeforeMigUserHeader
38#endif /* __BeforeMigUserHeader */
39
40#include <sys/cdefs.h>
41__BEGIN_DECLS
42
43
44/* Routine host_security_create_task_token */
45#ifdefmig_external
46mig_external
47#else
48extern
49#endif/* mig_external */
50kern_return_t host_security_create_task_token
51(
52host_security_t host_security,
53task_t parent_task,
54security_token_t sec_token,
55audit_token_t audit_token,
56host_t host,
57ledger_array_t ledgers,
58mach_msg_type_number_t ledgersCnt,
59boolean_t inherit_memory,
60task_t *child_task
61);
62
63/* Routine host_security_set_task_token */
64#ifdefmig_external
65mig_external
66#else
67extern
68#endif/* mig_external */
69kern_return_t host_security_set_task_token
70(
71host_security_t host_security,
72task_t target_task,
73security_token_t sec_token,
74audit_token_t audit_token,
75host_t host
76);
77
78__END_DECLS
79
80/********************** Caution **************************/
81/* The following data types should be used to calculate */
82/* maximum message sizes only. The actual message may be */
83/* smaller, and the position of the arguments within the */
84/* message layout may vary from what is presented here. */
85/* For example, if any of the arguments are variable- */
86/* sized, and less than the maximum is sent, the data */
87/* will be packed tight in the actual message to reduce */
88/* the presence of holes. */
89/********************** Caution **************************/
90
91/* typedefs for all requests */
92
93#ifndef __Request__host_security_subsystem__defined
94#define __Request__host_security_subsystem__defined
95
96#ifdef __MigPackStructs
97#pragma pack(4)
98#endif
99typedef struct {
100mach_msg_header_t Head;
101/* start of the kernel processed data */
102mach_msg_body_t msgh_body;
103mach_msg_port_descriptor_t parent_task;
104mach_msg_port_descriptor_t host;
105mach_msg_ool_ports_descriptor_t ledgers;
106/* end of the kernel processed data */
107NDR_record_t NDR;
108security_token_t sec_token;
109audit_token_t audit_token;
110mach_msg_type_number_t ledgersCnt;
111boolean_t inherit_memory;
112} __Request__host_security_create_task_token_t;
113#ifdef __MigPackStructs
114#pragma pack()
115#endif
116
117#ifdef __MigPackStructs
118#pragma pack(4)
119#endif
120typedef struct {
121mach_msg_header_t Head;
122/* start of the kernel processed data */
123mach_msg_body_t msgh_body;
124mach_msg_port_descriptor_t target_task;
125mach_msg_port_descriptor_t host;
126/* end of the kernel processed data */
127NDR_record_t NDR;
128security_token_t sec_token;
129audit_token_t audit_token;
130} __Request__host_security_set_task_token_t;
131#ifdef __MigPackStructs
132#pragma pack()
133#endif
134#endif /* !__Request__host_security_subsystem__defined */
135
136/* union of all requests */
137
138#ifndef __RequestUnion__host_security_subsystem__defined
139#define __RequestUnion__host_security_subsystem__defined
140union __RequestUnion__host_security_subsystem {
141__Request__host_security_create_task_token_t Request_host_security_create_task_token;
142__Request__host_security_set_task_token_t Request_host_security_set_task_token;
143};
144#endif /* !__RequestUnion__host_security_subsystem__defined */
145/* typedefs for all replies */
146
147#ifndef __Reply__host_security_subsystem__defined
148#define __Reply__host_security_subsystem__defined
149
150#ifdef __MigPackStructs
151#pragma pack(4)
152#endif
153typedef struct {
154mach_msg_header_t Head;
155/* start of the kernel processed data */
156mach_msg_body_t msgh_body;
157mach_msg_port_descriptor_t child_task;
158/* end of the kernel processed data */
159} __Reply__host_security_create_task_token_t;
160#ifdef __MigPackStructs
161#pragma pack()
162#endif
163
164#ifdef __MigPackStructs
165#pragma pack(4)
166#endif
167typedef struct {
168mach_msg_header_t Head;
169NDR_record_t NDR;
170kern_return_t RetCode;
171} __Reply__host_security_set_task_token_t;
172#ifdef __MigPackStructs
173#pragma pack()
174#endif
175#endif /* !__Reply__host_security_subsystem__defined */
176
177/* union of all replies */
178
179#ifndef __ReplyUnion__host_security_subsystem__defined
180#define __ReplyUnion__host_security_subsystem__defined
181union __ReplyUnion__host_security_subsystem {
182__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
183__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
184};
185#endif /* !__RequestUnion__host_security_subsystem__defined */
186
187#ifndef subsystem_to_name_map_host_security
188#define subsystem_to_name_map_host_security \
189 { "host_security_create_task_token", 600 },\
190 { "host_security_set_task_token", 601 }
191#endif
192
193#ifdef __AfterMigUserHeader
194__AfterMigUserHeader
195#endif /* __AfterMigUserHeader */
196
197#endif /* _host_security_user_ */
198

Archive Download this file

Revision: 881