diff --git a/CASA.changes b/CASA.changes
index 69a9cf8a..9a0e2df8 100644
--- a/CASA.changes
+++ b/CASA.changes
@@ -1,6 +1,16 @@
-------------------------------------------------------------------
Wed Nov 18 14:09:19 MST 2005 - jnorman@novell.com
+- Bug fixes: 135387, 135393
+
+-------------------------------------------------------------------
+Wed Nov 23 16:09:19 MST 2005 - jnorman@novell.com
+
+- changed PAM Capture to find libmicasa in path
+
+-------------------------------------------------------------------
+Wed Nov 18 14:09:19 MST 2005 - jnorman@novell.com
+
- Change GUI dependency from gtk2-devel to gtk2.
-------------------------------------------------------------------
diff --git a/c_micasad/cache/KeyChain.cs b/c_micasad/cache/KeyChain.cs
index a1ff7cc6..aa007d25 100644
--- a/c_micasad/cache/KeyChain.cs
+++ b/c_micasad/cache/KeyChain.cs
@@ -89,6 +89,17 @@ class KeyChain : IKeychain
public void RemoveSecret(String secretID)
{
+ // remove all keyvalues first, as to unlink reverse links
+ try
+ {
+ Secret secret = GetSecret(secretID);
+ secret.RemoveAllKeyValuePairs(this);
+ }
+ catch
+ {
+
+ }
+
SecretList.Remove(secretID);
this.ModifiedTime = DateTime.Now;
}
diff --git a/c_micasad/cache/Secret.cs b/c_micasad/cache/Secret.cs
index e0ecb0a0..7256914b 100644
--- a/c_micasad/cache/Secret.cs
+++ b/c_micasad/cache/Secret.cs
@@ -2,6 +2,8 @@ using System;
using System.Text;
using System.Collections;
+using Novell.CASA.MiCasa.Common;
+
namespace sscs.cache
{
class Secret : ISecret
@@ -195,14 +197,51 @@ namespace sscs.cache
return null;
}
- public void RemoveKeyValue(string key)
- {
+ internal void RemoveAllKeyValuePairs(KeyChain kc)
+ {
+ if (htKeyValues != null)
+ {
+ IDictionaryEnumerator enumer = htKeyValues.GetEnumerator();
+ while (enumer.MoveNext())
+ {
+ String key = (String)enumer.Key;
+ RemoveKeyValue(kc, key);
+ }
+ }
+ }
+
+ public void RemoveKeyValue(KeyChain kc, string key)
+ {
if (htKeyValues.Contains(key))
{
+ // remove all reverse links first
+ RemoveReverseLinkedKeys(kc, key);
htKeyValues.Remove(key);
}
}
+ private void RemoveReverseLinkedKeys(KeyChain kc, string keyId)
+ {
+ Hashtable linkedKeys = GetLinkedKeys(keyId);
+ if (kc != null && linkedKeys != null)
+ {
+ IDictionaryEnumerator lkis = linkedKeys.GetEnumerator();
+ while (lkis.MoveNext())
+ {
+ LinkedKeyInfo lki = (LinkedKeyInfo)lkis.Value;
+
+ // look up reverse linked key
+ Secret secret = kc.GetSecret(lki.GetLinkedSecretID());
+ if (secret != null)
+ {
+ // look up linked key
+ KeyValue kv = secret.GetKeyValue(lki.GetLinkedKeyID());
+ kv.RemoveLink(secretID + ":" + keyId);
+ }
+ }
+ }
+ }
+
public DateTime GetKeyValueCreatedTime(string key)
{
if (htKeyValues.Contains(key))
@@ -238,8 +277,9 @@ namespace sscs.cache
}
- public void MergeSecret(Secret newSecret)
- {
+ public void MergeSecret(SecretStore store, Secret newSecret)
+ {
+
IDictionaryEnumerator etor = (IDictionaryEnumerator)newSecret.htKeyValues.GetEnumerator();
while(etor.MoveNext())
{
@@ -254,7 +294,7 @@ namespace sscs.cache
{
string sKey = (string)etor.Key;
if(!htKeyValues.Contains(sKey))
- this.RemoveKeyValue(sKey);
+ this.RemoveKeyValue(store.GetKeyChainDefault(), sKey);
}
}
diff --git a/c_micasad/cache/SecretStore.cs b/c_micasad/cache/SecretStore.cs
index 1879e6da..bba728f3 100644
--- a/c_micasad/cache/SecretStore.cs
+++ b/c_micasad/cache/SecretStore.cs
@@ -505,6 +505,12 @@ namespace sscs.cache
keyChainList.Remove(id);
return true;
}
+
+ internal KeyChain GetKeyChainDefault()
+ {
+ return GetKeyChain("SSCS_SESSION_KEY_CHAIN_ID\0");
+ }
+
internal KeyChain GetKeyChain(string id)
{
if(keyChainList.ContainsKey(id))
@@ -519,9 +525,9 @@ namespace sscs.cache
CSSSLogger.DbgLog("In " + CSSSLogger.GetExecutionPath(this) + " Keychain doesnot exist.Returning null.");
throw new KeyChainDoesNotExistException(id);
}
-
}
- internal bool CheckIfKeyChainExists(string id)
+
+ internal bool CheckIfKeyChainExists(string id)
{
if(keyChainList.ContainsKey(id))
return true;
diff --git a/c_micasad/lib/AssemblyInfo.cs b/c_micasad/lib/AssemblyInfo.cs
index 177a4f0e..1005ed75 100644
--- a/c_micasad/lib/AssemblyInfo.cs
+++ b/c_micasad/lib/AssemblyInfo.cs
@@ -26,7 +26,7 @@ using System.Runtime.CompilerServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.5.146.0")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
diff --git a/c_micasad/micasad.csproj b/c_micasad/micasad.csproj
index e9ddd470..a77dd058 100644
--- a/c_micasad/micasad.csproj
+++ b/c_micasad/micasad.csproj
@@ -300,7 +300,7 @@
/>