2 // sa_request.defs - Client-side Mach RPC interface to SecurityAgent.
4 #include <mach/std_types.defs>
5 #include <mach/mach_types.defs>
7 subsystem secagentrequest 1100;
8 serverprefix sa_request_server_;
9 userprefix sa_request_client_;
11 import <security_agent_client/sa_types.h>;
16 type Data = array [] of char;
18 type AuthorizationString = c_string[*:1024];
19 type AuthorizationItemSetBlob = Data
20 ctype: AuthorizationItemSetPtr;
21 type AuthorizationItemSetPtr = unsigned32;
22 type AuthorizationValueVectorBlob = Data
23 ctype: AuthorizationValueVectorPtr;
24 type AuthorizationValueVectorPtr = unsigned32;
25 type SessionId = unsigned32;
26 type Choice = struct[2] of unsigned32;
28 #define BLOB(name,type) name: type##Blob; name##Base: type##Ptr
31 // Staged SecurityAgent request protocol
33 simpleroutine create(requestport agentPort: mach_port_t;
34 instanceReplyPort: mach_port_make_send_t; // give agent send rights for replies
36 pluginId: AuthorizationString;
37 mechanismId: AuthorizationString);
39 simpleroutine invoke(requestport instanceRequestPort: mach_port_t;
40 BLOB(argumentsIn,AuthorizationValueVector);
41 BLOB(hintsIn,AuthorizationItemSet);
42 BLOB(contextIn,AuthorizationItemSet));
44 simpleroutine deactivate(requestport instanceRequestPort: mach_port_t);
46 simpleroutine destroy(requestport instanceRequestPort: mach_port_t);
49 // Tell the SecurityAgent to go away we no longer need you.
51 simpleroutine terminate(requestport agentPort: mach_port_t);
54 // Support transaction semantics outside the usual client protocol
55 // (those semantics not defined here)
57 routine txStart(agentPort: mach_port_t;
58 sreplyport clientReplyPort: mach_port_make_send_once_t);
60 simpleroutine txEnd(agentPort: mach_port_t);
65 simpleroutine contact(requestport agentPort: mach_port_t;
66 clientPort: mach_port_make_send_t;
67 serveraudittoken sourceAudit: audit_token_t;
68 jobPort: mach_port_move_send_t;
69 processBootstrap: mach_port_t;
70 userPrefs: mach_port_t);