28
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef NCMSERVERSECURITYPOLICY_H
|
|
24 |
#define NCMSERVERSECURITYPOLICY_H
|
|
25 |
|
|
26 |
#include <e32base.h>
|
|
27 |
#include "ncmserverconsts.h"
|
|
28 |
|
|
29 |
/** NCM Server Security Policy Definition */
|
|
30 |
const TInt KNcmServerRanges[] =
|
|
31 |
{
|
|
32 |
ENcmTransferHandle, /** pass */
|
|
33 |
ENcmNotSupport, /** fail (to KMaxTInt) */
|
|
34 |
};
|
|
35 |
|
|
36 |
const TUint KNcmServerRangeCount = sizeof(KNcmServerRanges) / sizeof(KNcmServerRanges[0]);
|
|
37 |
|
|
38 |
/** Index numbers into KAcmServerElements[] */
|
|
39 |
const TInt KPolicyPass = 0;
|
|
40 |
|
|
41 |
/** Mapping IPCs to policy element */
|
|
42 |
const TUint8 KNcmServerElementsIndex[KNcmServerRangeCount] =
|
|
43 |
{
|
|
44 |
KPolicyPass, /** All (valid) APIs */
|
|
45 |
CPolicyServer::ENotSupported, /** remainder of possible IPCs */
|
|
46 |
};
|
|
47 |
|
|
48 |
/** Individual policy elements */
|
|
49 |
const CPolicyServer::TPolicyElement KNcmServerElements[] =
|
|
50 |
{
|
|
51 |
{
|
|
52 |
// These caps are those of USBSVR's process. This is the recommended
|
|
53 |
// way to check that an API is called by a specific process only. [The
|
|
54 |
// alternative would be an SID check.]
|
|
55 |
//_INIT_SECURITY_POLICY_C5(ECapabilityCommDD, ECapabilityNetworkControl, ECapabilityNetworkServices, ECapabilityLocalServices, ECapabilityProtServ), CPolicyServer::EFailClient
|
|
56 |
_INIT_SECURITY_POLICY_PASS
|
|
57 |
},
|
|
58 |
};
|
|
59 |
|
|
60 |
/** Main policy */
|
|
61 |
const CPolicyServer::TPolicy KNcmServerPolicy =
|
|
62 |
{
|
|
63 |
CPolicyServer::EAlwaysPass, /** Specifies all connect attempts should pass */
|
|
64 |
KNcmServerRangeCount,
|
|
65 |
KNcmServerRanges,
|
|
66 |
KNcmServerElementsIndex,
|
|
67 |
KNcmServerElements,
|
|
68 |
};
|
|
69 |
|
|
70 |
#endif // NCMSERVERSECURITYPOLICY_H
|