]> git.saurik.com Git - apple/security.git/blob - SecurityServer/secagent.defs
Security-28.tar.gz
[apple/security.git] / SecurityServer / secagent.defs
1 //
2 // secagent.defs - Client-side Mach RPC interface to SecurityAgent.
3 //
4 // Note: one additional message ID code (Client::cancelMessagePseudoID) is used
5 // explicitly without showing up in this file.
6 //
7 #include <mach/std_types.defs>
8 #include <mach/mach_types.defs>
9
10 subsystem secagent 1000;
11 serverprefix secagent_server_;
12 userprefix secagent_client_;
13
14 import <Security/secagent_types.h>;
15
16
17 //
18 // Data types
19 //
20 type OSStatus = int32;
21 type pid_t = int32;
22 type AclAuthorization = unsigned32;
23 type Reason = unsigned32;
24 type String = c_string[*:2048];
25 type ConstString = c_string[*:2048];
26 type Username = c_string[*:80];
27 type Choice = struct[2] of unsigned32;
28 type MigBoolean = unsigned32;
29
30
31 //
32 // Common argument profiles
33 //
34 #define UCSP_PORTS requestport sport: mach_port_t; \
35 replyport rport: mach_port_t; \
36 out status: OSStatus
37 #define IN_BLOB(name) in name: name##Blob; in name##Base: name##Ptr
38
39
40 //
41 // Staged query maintainance (common to all staged queries)
42 //
43 routine finishStagedQuery(UCSP_PORTS);
44 routine cancelStagedQuery(UCSP_PORTS; in reason: Reason);
45
46
47 //
48 // Unlocking keychains by user input
49 //
50 routine unlockDatabase(UCSP_PORTS;
51 in requestor: ConstString; in requestPid: pid_t; in database: ConstString;
52 out stagePort: mach_port_copy_send_t; out passphrase: String);
53 routine retryUnlockDatabase(UCSP_PORTS; in reason: Reason; out passphrase: String);
54
55 //
56 // Get a new passphrase for a database
57 //
58 routine queryNewPassphrase(UCSP_PORTS;
59 in requestor: ConstString; in requestPid: pid_t; in database: ConstString;
60 in reason: Reason;
61 out stagePort: mach_port_copy_send_t; out passphrase: String);
62 routine retryNewPassphrase(UCSP_PORTS; in reason: Reason; out passphrase: String);
63
64 //
65 // "Rogue App" alert/confirm function
66 //
67 routine queryKeychainAccess(UCSP_PORTS;
68 in requestor: ConstString; in requestPid: pid_t; in database: ConstString;
69 in item: ConstString; in operation: AclAuthorization;
70 out choice: Choice);
71
72 //
73 // Generic new/old password prompt interface
74 //
75 routine queryNewGenericPassphrase(UCSP_PORTS;
76 in requestor: ConstString; in requestPid: pid_t; in prompt: ConstString;
77 in reason: Reason; out stagePort: mach_port_copy_send_t;
78 in showBox: MigBoolean; inout addBox: MigBoolean; out passphrase: String);
79 routine retryNewGenericPassphrase(UCSP_PORTS; in reason: Reason;
80 out addBox: MigBoolean; out passphrase: String);
81
82 routine queryOldGenericPassphrase(UCSP_PORTS;
83 in requestor: ConstString; in requestPid: pid_t; in prompt: ConstString;
84 out stagePort: mach_port_copy_send_t;
85 in showBox: MigBoolean; inout addBox: MigBoolean; out passphrase: String);
86 routine retryOldGenericPassphrase(UCSP_PORTS; in reason: Reason;
87 out addBox: MigBoolean; out passphrase: String);
88
89 //
90 // Authorization subsystem authentication option
91 //
92 routine authorizationAuthenticate(UCSP_PORTS;
93 in requestor: ConstString; in requestPid: pid_t;
94 in neededGroup: ConstString; in candidateUser: ConstString;
95 out stagePort: mach_port_copy_send_t;
96 out authenticatedUser: Username; out authenticatedPassword: String);
97 routine retryAuthorizationAuthenticate(UCSP_PORTS; in reason: Reason;
98 out authenticatedUser: Username; out authenticatedPassword: String);