installationservices/swi/source/sislauncher/server/sislauncherserver.cpp
changeset 60 245df5276b97
parent 42 d17dc5398051
child 75 2d2d25361590
--- a/installationservices/swi/source/sislauncher/server/sislauncherserver.cpp	Tue Jul 06 14:23:31 2010 +0300
+++ b/installationservices/swi/source/sislauncher/server/sislauncherserver.cpp	Wed Aug 18 09:55:45 2010 +0300
@@ -153,15 +153,14 @@
         } 
     }
 
-    // All functions require TCB capability
 const TInt CSisLauncherServer::iRanges[iRangeCount] = 
     {
     0, // All connect attempts
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-    // Range of utility services for Post manufacture management of Layered Execution Environemnts
-    EParseSwTypeRegFile,
-    EUnregisterSifLauncherMimeTypes,
-    EAsyncParseResourceFileSize,
+    EParseSwTypeRegFile,                                // accessible by Installserver 
+    EUnregisterSifLauncherMimeTypes,                    // accessible by SisRegistryServer
+    ENotifyApparcForApps,                               // accessible by Installserver and SisRegistry
+    EAsyncParseResourceFileSize,                        // accessible by all clients
 #endif
     ESeparatorEndAll,
     };
@@ -172,10 +171,12 @@
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
     1, // Utility services used by InstallServer
     2, // Utility services used by SisRegistryServer
+    CPolicyServer::ECustomCheck,
     CPolicyServer::EAlwaysPass,
 #endif  
     CPolicyServer::ENotSupported,
     };
+
 const CPolicyServer::TPolicyElement CSisLauncherServer::iPolicyElements[] = 
     {
     {_INIT_SECURITY_POLICY_C1(ECapabilityTCB), CPolicyServer::EFailClient},
@@ -327,6 +328,22 @@
     CleanupStack::PopAndDestroy(threadMonitor);
     }
 
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+CPolicyServer::TCustomResult CSisLauncherServer::CustomSecurityCheckL(const RMessage2& aMsg, 
+    TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)
+    {
+    TUint32 secureId = aMsg.SecureId().iId;
+    if (secureId == KInstallServerUid || secureId == KSisRegistryServerUid)
+        {
+        return CPolicyServer::EPass;
+        }
+    else
+        {
+        //client accessing the function is neither Install Server nor Sis Registry
+        return CPolicyServer::EFail;
+        }
+    }
+#endif
 
 #ifndef SWI_TEXTSHELL_ROM
 void CSisLauncherServer::StartDocumentL(RFile& aFile, TBool aWait)
@@ -565,6 +582,7 @@
     apaSession.ForceRegistration(aApplicationRegistrationData);
     CleanupStack::PopAndDestroy();
     }
+
 #endif
 #endif