Alpha code for Secret Persistence Policy. In Progress.

This commit is contained in:
Jim Norman 2006-09-15 22:29:08 +00:00
parent b7c2fc8b7c
commit 48fd98dedb
2 changed files with 15 additions and 1 deletions

View File

@ -181,6 +181,15 @@ namespace sscs.cache
{
CSSSLogger.DbgLog("StartPersistenceByDesktopPasswd - Called");
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
string sShouldUseDesktop = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_DECRYPT_USING_DESKTOP_PASS);
if ((sShouldUseDesktop != null) && (sShouldUseDesktop.Equals("0")))
{
CSSSLogger.DbgLog("Policy set: Did not start persistent by Desktop Password");
return false;
}
// make sure we have a Persistence Directory
if (GetPersistenceDirectory() == null || GetPersistenceDirectory().Length < 1)
{
@ -797,7 +806,7 @@ namespace sscs.cache
// the user might have set a different one
// load the policy file and check.
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
string sDir = uiPolicy.GetConfigSetting("PersistentDirectory");
string sDir = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_PERSISTENT_DIRECTORY);
if ((sDir != null) && (sDir.Length > 0))
{
m_persistenceDirectory = sDir;

View File

@ -120,6 +120,11 @@ namespace sscs.constants
internal static string MICASA_VALIDATION_STRING = "miCASAValidationString";
// these are used in the GUI too.
internal static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
internal static string CONFIG_PERSIST_SECRETS = "PersistSecrets";
internal static string CONFIG_DECRYPT_USING_DESKTOP_PASS = "DecryptUsingDesktopPassword";
}
internal class ConstFlags