supl/locationsuplfw/gateway/src/epos_csuplserver.cpp
branchRCL_3
changeset 42 02ba3f1733c6
parent 0 667063e416a2
child 44 2b4ea9893b66
equal deleted inserted replaced
41:d746aee05493 42:02ba3f1733c6
   140     DEBUG_TRACE("CSuplServer::ConstructL", __LINE__)
   140     DEBUG_TRACE("CSuplServer::ConstructL", __LINE__)
   141     
   141     
   142     // Settings
   142     // Settings
   143     TInt keyValue;
   143     TInt keyValue;
   144     TInt err = KErrNone;
   144     TInt err = KErrNone;
   145     
   145     CRepository* repository = NULL;
   146     CRepository* repository = CRepository::NewL(KCRUidSuplConfiguration);
   146     TRAP(err, repository = CRepository::NewL(KCRUidSuplConfiguration));
   147     CleanupStack::PushL(repository);
   147     CleanupStack::PushL(repository);
   148     
   148     
   149     if (err != KErrNone)
   149     if (err != KErrNone)
   150         {
   150         {
   151         SetErrorCode(err);
   151         SetErrorCode(err);
   262         {
   262         {
   263         User::Leave(KErrNotSupported);
   263         User::Leave(KErrNotSupported);
   264         }
   264         }
   265 
   265 
   266     //if secure id is not equal to KSuplWapSecureId or KSuplWapSecureId, then perform capability check
   266     //if secure id is not equal to KSuplWapSecureId or KSuplWapSecureId, then perform capability check
   267     if ((aMessage.SecureId() != KSuplWapSecureId && aMessage.SecureId() != KNetworkGatewaySID))
   267     if ((aMessage.SecureId() != KSuplWapSecureId && aMessage.SecureId() != KNetworkGatewaySID && aMessage.SecureId() != 0x102869DF))
   268     	{
   268     	{
   269         if (!aMessage.HasCapability(ECapabilityCommDD))
   269         if (!aMessage.HasCapability(ECapabilityCommDD))
   270             {
   270             {
   271             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)	
   271             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)	
   272             User::Leave(KErrPermissionDenied);
   272             User::Leave(KErrPermissionDenied);
   320     TBool isNetworkGateway = allowNetworkGatewayPolicy().CheckPolicy(aMessage); 
   320     TBool isNetworkGateway = allowNetworkGatewayPolicy().CheckPolicy(aMessage); 
   321 
   321 
   322     static _LIT_SECURITY_POLICY_S0(allowSuplWapPolicy, KSuplWapSecureId);
   322     static _LIT_SECURITY_POLICY_S0(allowSuplWapPolicy, KSuplWapSecureId);
   323     TBool isSuplWap = allowSuplWapPolicy().CheckPolicy(aMessage); 
   323     TBool isSuplWap = allowSuplWapPolicy().CheckPolicy(aMessage); 
   324     
   324     
   325     //Check if the request was made by one of the allowed processes else check for required capability
   325     static _LIT_SECURITY_POLICY_S0(allowlocationserverPolicy, 0x102869DF);
   326     if (!isNetworkGateway && !isSuplWap )
   326        TBool islocationserver = allowlocationserverPolicy().CheckPolicy(aMessage); 
       
   327        
       
   328        //Check if the request was made by one of the allowed processes else check for required capability
       
   329        if (!isNetworkGateway && !isSuplWap && !islocationserver)
   327         {
   330         {
   328         if (!aMessage.HasCapability(ECapabilityCommDD))
   331         if (!aMessage.HasCapability(ECapabilityCommDD))
   329             {
   332             {
   330             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)   
   333             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)   
   331             result = CPolicyServer::EFail;          
   334             result = CPolicyServer::EFail;