sl@0
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// USB mass storage Server Security Policy definitions for Platform security.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file
|
sl@0
|
20 |
@internalComponent
|
sl@0
|
21 |
*/
|
sl@0
|
22 |
|
sl@0
|
23 |
#if !defined(__USBMSSERVERSECURITYPOLICY_H__)
|
sl@0
|
24 |
#define __USBMSSERVERSECURITYPOLICY_H__
|
sl@0
|
25 |
|
sl@0
|
26 |
#include <usbmsshared.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
// USB masss storage Server Security Policy Definition
|
sl@0
|
29 |
|
sl@0
|
30 |
const TUint KUsbMsServerRangeCount = 3;
|
sl@0
|
31 |
|
sl@0
|
32 |
const TInt KUsbMsServerRanges[KUsbMsServerRangeCount] =
|
sl@0
|
33 |
{
|
sl@0
|
34 |
EUsbMsStart, // NetworkControl [Start/Stop]
|
sl@0
|
35 |
EUsbMsShutdown, // DiskAdmin [Shutdown]
|
sl@0
|
36 |
EUsbMsShutdown + 1, // fail (to KMaxInt)
|
sl@0
|
37 |
};
|
sl@0
|
38 |
|
sl@0
|
39 |
// Index numbers into KUsbMsServerElements[]
|
sl@0
|
40 |
const TInt KPolicyNetworkControl = 0;
|
sl@0
|
41 |
const TInt KPolicyDiskAdmin = 1;
|
sl@0
|
42 |
|
sl@0
|
43 |
// Mapping IPCs to poicy element
|
sl@0
|
44 |
const TUint8 KUsbMsServerElementsIndex[KUsbMsServerRangeCount] =
|
sl@0
|
45 |
{
|
sl@0
|
46 |
KPolicyNetworkControl, // EUsbMsStart & EUsbMsStop
|
sl@0
|
47 |
KPolicyDiskAdmin, // EUsbMsShutdown
|
sl@0
|
48 |
CPolicyServer::ENotSupported, // EUsbMsShutdown + 1 to KMaxTInt
|
sl@0
|
49 |
};
|
sl@0
|
50 |
|
sl@0
|
51 |
// Individual policy elements
|
sl@0
|
52 |
const CPolicyServer::TPolicyElement KUsbMsServerElements[] =
|
sl@0
|
53 |
{
|
sl@0
|
54 |
{ _INIT_SECURITY_POLICY_C1(ECapabilityNetworkControl), CPolicyServer::EFailClient },
|
sl@0
|
55 |
{ _INIT_SECURITY_POLICY_C1(ECapabilityDiskAdmin), CPolicyServer::EFailClient},
|
sl@0
|
56 |
// the EFailClient means that if the check fails
|
sl@0
|
57 |
// the CheckFailed method with return KErrPermissionDenied
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
// Main policy
|
sl@0
|
61 |
const CPolicyServer::TPolicy KUsbMsServerPolicy =
|
sl@0
|
62 |
{
|
sl@0
|
63 |
CPolicyServer::EAlwaysPass, // all connect attempts should pass
|
sl@0
|
64 |
KUsbMsServerRangeCount,
|
sl@0
|
65 |
KUsbMsServerRanges,
|
sl@0
|
66 |
KUsbMsServerElementsIndex,
|
sl@0
|
67 |
KUsbMsServerElements,
|
sl@0
|
68 |
};
|
sl@0
|
69 |
#endif //__USBMSSERVERSECURITYPOLICY_H__
|