sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Class definitions for configuration data used by the User Prompt Service client library.
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file
|
sl@0
|
22 |
@internalComponent
|
sl@0
|
23 |
@released
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef SERVICECONFIG_H
|
sl@0
|
27 |
#define SERVICECONFIG_H
|
sl@0
|
28 |
|
sl@0
|
29 |
#include <e32base.h>
|
sl@0
|
30 |
#include <e32cmn.h>
|
sl@0
|
31 |
|
sl@0
|
32 |
namespace UserPromptService
|
sl@0
|
33 |
{
|
sl@0
|
34 |
/**
|
sl@0
|
35 |
Specifies whether authorisation from the User Prompt Service is required for
|
sl@0
|
36 |
requests from clients that passed the system server's security check.
|
sl@0
|
37 |
|
sl@0
|
38 |
Note that protected SID checks are based on the SID of the application excutable
|
sl@0
|
39 |
issuing the request, not the UID of the package owning that executable.
|
sl@0
|
40 |
|
sl@0
|
41 |
If a policy file is not defined for a system server or service then a default
|
sl@0
|
42 |
value of ECheckNever will be used because this is compatible with the existing
|
sl@0
|
43 |
platform security behavior.
|
sl@0
|
44 |
*/
|
sl@0
|
45 |
enum TAuthorisationPolicy
|
sl@0
|
46 |
{
|
sl@0
|
47 |
/**
|
sl@0
|
48 |
Ignore the system server (platsec) checks, and always ask the UPS what to do.
|
sl@0
|
49 |
*/
|
sl@0
|
50 |
EAlwaysCheck = 0,
|
sl@0
|
51 |
|
sl@0
|
52 |
/**
|
sl@0
|
53 |
For application executables with a protected SID, launched from the
|
sl@0
|
54 |
Z drive, where the system server checks have passed, allow the request.
|
sl@0
|
55 |
Otherwise call the UPS which may still choose to allow the request.
|
sl@0
|
56 |
|
sl@0
|
57 |
For all other executables, ignore the system server (platsec) checks, and
|
sl@0
|
58 |
always ask the UPS what to do.
|
sl@0
|
59 |
*/
|
sl@0
|
60 |
ECheckPostManufacture = 1,
|
sl@0
|
61 |
|
sl@0
|
62 |
/**
|
sl@0
|
63 |
For application executables with a protected SID (regardless of drive), where
|
sl@0
|
64 |
the system server checks have passed, allow the request.
|
sl@0
|
65 |
Otherwise call the UPS which may still choose to allow the request.
|
sl@0
|
66 |
|
sl@0
|
67 |
For all other executables, ignore the system server (platsec) checks, and
|
sl@0
|
68 |
always ask the UPS what to do.
|
sl@0
|
69 |
*/
|
sl@0
|
70 |
ECheckUnprotectedSids = 2,
|
sl@0
|
71 |
|
sl@0
|
72 |
/**
|
sl@0
|
73 |
If the system server checks passed, allow the request.
|
sl@0
|
74 |
If they failed, call the UPS which may still choose to allow the request.
|
sl@0
|
75 |
*/
|
sl@0
|
76 |
ECheckIfFailed = 3,
|
sl@0
|
77 |
|
sl@0
|
78 |
/**
|
sl@0
|
79 |
If the system server checks passed, allow the request.
|
sl@0
|
80 |
If the system server checks failed, reject the request.
|
sl@0
|
81 |
|
sl@0
|
82 |
Never query the UPS - just use existing security check result implemented
|
sl@0
|
83 |
by system server.
|
sl@0
|
84 |
*/
|
sl@0
|
85 |
ENeverCheck = 4
|
sl@0
|
86 |
};
|
sl@0
|
87 |
|
sl@0
|
88 |
/**
|
sl@0
|
89 |
Encapsulates the configuration data for an individual service provided by a system server.
|
sl@0
|
90 |
This is used by the User Prompt Service client library and is derived from policy files.
|
sl@0
|
91 |
|
sl@0
|
92 |
- Associates a service id with the policy that determines whether the system
|
sl@0
|
93 |
server should ask the User Prompt Service whether the client's request is authorised.
|
sl@0
|
94 |
*/
|
sl@0
|
95 |
struct TServiceConfig
|
sl@0
|
96 |
{
|
sl@0
|
97 |
/** The UID of the service that this policy applies to. */
|
sl@0
|
98 |
TUint iServiceId; // This MUST be a TUint and MUST be at offset 0 in this struct
|
sl@0
|
99 |
/** Whether addtional authorisation is required from the user prompt service. */
|
sl@0
|
100 |
TAuthorisationPolicy iPolicy;
|
sl@0
|
101 |
TUint16 iMajorVersion; ///< Major version no. of UPS policy file.
|
sl@0
|
102 |
TUint16 iMinorVersion; ///< Minor version no. of UPS policy file.
|
sl@0
|
103 |
};
|
sl@0
|
104 |
}
|
sl@0
|
105 |
|
sl@0
|
106 |
#endif // SERVICECONFIG_H
|