atext/server/inc/atextsecpolicy.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 /*
       
     2 * Copyright (c) 2008 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:  ATEXT server security policy definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SECURITYPOLICY_H
       
    20 #define SECURITYPOLICY_H
       
    21 
       
    22 // Total number of ranges
       
    23 // Definition of the ranges of IPC numbers
       
    24 const TInt KSrvRanges[] =
       
    25     {
       
    26     0,            // Range 1: all client APIs
       
    27     EInvalidIpc   // Range 2: Invalid IPC opcode
       
    28     };
       
    29 
       
    30 const TUint KSrvRangeCount = sizeof(KSrvRanges) / sizeof(TInt);
       
    31 
       
    32 // Policy to implement for each of the above ranges
       
    33 const TUint8 KSrvElementsIndex[KSrvRangeCount] =
       
    34     {
       
    35     0,                              //policy 0 applies to 0th range
       
    36     CPolicyServer::ENotSupported    //applies to 7th range(out of range IPC)
       
    37     };
       
    38 
       
    39 // Specific capability checks
       
    40 const CPolicyServer::TPolicyElement KSrvElements[] =
       
    41     {
       
    42         {_INIT_SECURITY_POLICY_C2(ECapabilityLocalServices, ECapabilityNetworkControl),
       
    43          CPolicyServer::EFailClient
       
    44         }
       
    45     };
       
    46 
       
    47 // Package all the above together into a policy
       
    48 const CPolicyServer::TPolicy KSrvPolicy =
       
    49         {
       
    50         0,                  // only process with SID KATExtUserProcessSid can connect to server.
       
    51         KSrvRangeCount,     // Range count
       
    52         KSrvRanges,         // ranges array
       
    53         KSrvElementsIndex,  // elements' index
       
    54         KSrvElements        // array of elements
       
    55         };
       
    56 
       
    57 #endif // SECURITYPOLICY_H