rtsecuritymanager/rtsecuritymanagerserver/inc/rtsecmgrserverpolicy.inl
changeset 57 61b27eec6533
parent 45 7aa6007702af
equal deleted inserted replaced
45:7aa6007702af 57:61b27eec6533
     1 /*
       
     2 * Copyright (c) 2009 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 the License "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 
       
    20 
       
    21 
       
    22 /*
       
    23  * Security Manager Server's policy
       
    24  *
       
    25  */
       
    26 
       
    27 /*
       
    28  * Total number of ranges 
       
    29  */
       
    30 const TUint KSecMgrSrvPolicyRangeCount = 1;
       
    31 
       
    32 // Definition of the ranges of IPC numbers
       
    33 const TInt KSecMgrSrvRanges[KSecMgrSrvPolicyRangeCount] =
       
    34     {
       
    35     0
       
    36     //,   
       
    37     //ESecMgrSrvReqEnd             // 2nd range, non implemented function end of range check; ENotSupported
       
    38     };
       
    39 
       
    40 // Policy to implement for each of the above ranges
       
    41 const TUint8 KSecMgrSrvElementsIndex[KSecMgrSrvPolicyRangeCount] =
       
    42     {
       
    43     0
       
    44     //,                           // Applies to 0th range
       
    45     //CPolicyServer::ENotSupported // Applies to 1st range
       
    46     };
       
    47 
       
    48 // Specific capability checks
       
    49 const CPolicyServer::TPolicyElement KSecMgrSrvElements[] =
       
    50     {
       
    51     { _INIT_SECURITY_POLICY_C1( ECapabilityReadUserData ),  CPolicyServer::EFailClient },  // Policy "0"
       
    52     //{ _INIT_SECURITY_POLICY_C1( ECapabilityWriteDeviceData ), CPolicyServer::EFailClient },  // Policy "1"
       
    53     //{ _INIT_SECURITY_POLICY_S0( KSensrvTestFrameworkUid ),    CPolicyServer::EPanicClient }, // Policy "2", i.e. access is allowed only for test framework
       
    54     };
       
    55 
       
    56 // Package all the above together into a policy
       
    57 const CPolicyServer::TPolicy KSecMgrSrvPolicy =
       
    58     {
       
    59     CPolicyServer::EAlwaysPass, 	// All connect attempts to Security Manager Server pass
       
    60     KSecMgrSrvPolicyRangeCount,    // Number of ranges
       
    61     KSecMgrSrvRanges,              // Ranges array
       
    62     KSecMgrSrvElementsIndex,       // Elements <-> ranges index
       
    63     KSecMgrSrvElements,            // Array of elements
       
    64     };