]> git.saurik.com Git - apple/security.git/blob - SecurityServer/Authorization/AuthorizationTags.h
0b5c7f765a5bc99a4c148f575c396ed4dcd172e0
[apple/security.git] / SecurityServer / Authorization / AuthorizationTags.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 * AuthorizationTags.h -- Right tags for implementing access control in
21 * applications and daemons
22 */
23
24 #ifndef _SECURITY_AUTHORIZATIONTAGS_H_
25 #define _SECURITY_AUTHORIZATIONTAGS_H_
26
27
28 /*!
29 @header AuthorizationTags
30 Draft version 2 01/23/2001
31
32 This header defines some of the supported rights tags to be used in the Authorization API.
33 */
34
35
36 /*!
37 @define kAuthorizationEnvironmentUsername
38 The name of the AuthorizationItem that should be passed into the environment when specifying a username. The value and valueLength should contain the username itself.
39 */
40 #define kAuthorizationEnvironmentUsername "username"
41
42 /*!
43 @define kAuthorizationEnvironmentPassword
44 The name of the AuthorizationItem that should be passed into the environment when specifying a password for a given username. The value and valueLength should contain the actual password data.
45 */
46 #define kAuthorizationEnvironmentPassword "password"
47
48 /*!
49 @define kAuthorizationEnvironmentShared
50 The name of the AuthorizationItem that should be passed into the environment when specifying a username and password. Adding this entry to the environment will cause the username/password to be added to the shared credential pool of the calling applications session. This means that further calls by other applications in this session will automatically have this credential availible to them. The value is ignored.
51 */
52 #define kAuthorizationEnvironmentShared "shared"
53
54 /*!
55 @define kAuthorizationRightExecute
56 The name of the AuthorizationItem that should be passed into the rights when preauthorizing for a call to AuthorizationExecuteWithPrivileges().
57
58 You need to aquire this right to be able to perform a AuthorizationExecuteWithPrivileges() operation. In addtion to this right you should obtain whatever rights the tool you are executing with privileges need to perform it's operation on your behalf. Currently no options are supported but you should pass in the full path of the tool you wish to execute in the value and valueLength fields. In the future we will limit the right to only execute the requested path, and we will display this information to the user.
59 */
60 #define kAuthorizationRightExecute "system.privilege.admin"
61
62 /*!
63 @define kAuthorizationEnvironmentPrompt
64 The name of the AuthorizationItem that should be passed into the environment when specifying a invocation specific additional text. The value should be a localized UTF8 string.
65 */
66 #define kAuthorizationEnvironmentPrompt "prompt"
67
68 /*!
69 @define kAuthorizationEnvironmentIcon
70 The name of the AuthorizationItem that should be passed into the environment when specifying an alternate icon to be used. The value should be a full path to and image NSImage can deal with.
71 */
72 #define kAuthorizationEnvironmentIcon "icon"
73
74
75 #endif /* !_SECURITY_AUTHORIZATIONTAGS_H_ */