supl/locationsuplfw/gateway/src/epos_csuplserver.cpp
branchRCL_3
changeset 55 ea98413ce11f
parent 45 6b6920c56e2f
equal deleted inserted replaced
49:10852b179f64 55:ea98413ce11f
   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     CRepository* repository = NULL;
   145     
   146     TRAP(err, repository = CRepository::NewL(KCRUidSuplConfiguration));
   146     CRepository* 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 && aMessage.SecureId() != 0x102869DF))
   267     if ((aMessage.SecureId() != KSuplWapSecureId && aMessage.SecureId() != KNetworkGatewaySID))
   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     static _LIT_SECURITY_POLICY_S0(allowlocationserverPolicy, 0x102869DF);
   325     //Check if the request was made by one of the allowed processes else check for required capability
   326        TBool islocationserver = allowlocationserverPolicy().CheckPolicy(aMessage); 
   326     if (!isNetworkGateway && !isSuplWap )
   327        
       
   328        //Check if the request was made by one of the allowed processes else check for required capability
       
   329        if (!isNetworkGateway && !isSuplWap && !islocationserver)
       
   330         {
   327         {
   331         if (!aMessage.HasCapability(ECapabilityCommDD))
   328         if (!aMessage.HasCapability(ECapabilityCommDD))
   332             {
   329             {
   333             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)   
   330             DEBUG_TRACE("CSuplServer::Invalid UID", __LINE__)   
   334             result = CPolicyServer::EFail;          
   331             result = CPolicyServer::EFail;