diff --git a/CASA.changes b/CASA.changes index d74049a3..45ccf4a3 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 8 16:27:33 IST 2006 - smanojna@novell.com + +- Added Firefox MasterPassword prompt into CASAManager. + CASAManager will now prompt for master password during aggregating + the Firefox password manager if it is locked with a master password. + ------------------------------------------------------------------- Tue Mar 7 23:02:38 IST 2006 - lsreevatsa@novell.com diff --git a/c_gui/CasaMain.cs b/c_gui/CasaMain.cs index 5ae368d1..f7997514 100644 --- a/c_gui/CasaMain.cs +++ b/c_gui/CasaMain.cs @@ -77,7 +77,8 @@ namespace Novell.CASA.GUI dialogLoginReprompt, dialogShortPassword, dialogResetMP, - dialogStillRunning; + dialogStillRunning, + dialogFirefoxMP; [Glade.Widget] Gtk.Entry entryMasterPassword1, @@ -88,7 +89,8 @@ namespace Novell.CASA.GUI entryDesktopPassword2, entryOldMP, entryNewMP1, - entryNewMP2; + entryNewMP2, + entryFirefoxMP; [Glade.Widget] Gtk.CheckButton checkbuttonFirefox, @@ -660,8 +662,13 @@ namespace Novell.CASA.GUI case Common.STORE_FIREFOX: if( false == objFirefox.IS_STORE_AGGREGATED ) { - objFirefox.AggregateStore(); - objFirefox.IS_STORE_AGGREGATED = true; + if( StoreDataInterface.IsMasterPasswordSet(Common.STORE_FIREFOX) ) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogFirefoxMP", null); + gxmlTemp.Autoconnect (this); + dialogFirefoxMP.SetPosition(Gtk.WindowPosition.CenterOnParent); + dialogFirefoxMP.TransientFor = windowMain; + } } break; @@ -686,7 +693,31 @@ namespace Novell.CASA.GUI } } - + public void on_buttonFirefoxMPok_clicked(object obj, EventArgs args) + { + if( "" != entryFirefoxMP.Text ) + if( StoreDataInterface.VerifyMasterPassword(entryFirefoxMP.Text, Common.STORE_FIREFOX) ) + { + dialogFirefoxMP.Destroy(); + objFirefox.AggregateStore(); + objFirefox.IS_STORE_AGGREGATED = true; + } + else + { + entryFirefoxMP.Text = ""; + entryFirefoxMP.HasFocus(); + } + } + + public void on_buttonFirefoxMPclose_clicked(object obj, EventArgs args) + { + dialogFirefoxMP.Destroy(); + } + + public void on_buttonFirefoxMPhelp_clicked(object obj, EventArgs args) + { + + } /// /// ******************************************************************** @@ -919,8 +950,21 @@ namespace Novell.CASA.GUI objMiCasa.AggregateStore(); if( Common.IS_FIREFOX ) - objFirefox.AggregateStore(); - + { + if( false == objFirefox.IS_STORE_AGGREGATED ) + { + if( StoreDataInterface.IsMasterPasswordSet(Common.STORE_FIREFOX) ) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogFirefoxMP", null); + gxmlTemp.Autoconnect (this); + dialogFirefoxMP.SetPosition(Gtk.WindowPosition.CenterOnParent); + dialogFirefoxMP.TransientFor = windowMain; + } + } + else + objFirefox.AggregateStore(); + } + if( Common.IS_MOZILLA ) objMozilla.AggregateStore(); @@ -1430,14 +1474,24 @@ namespace Novell.CASA.GUI if(Common.IS_FIREFOX) { if( null == objFirefox ) + { + /*if( StoreDataInterface.IsMasterPasswordSet(Common.STORE_FIREFOX) ) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogPreferences", null); + gxmlTemp.Autoconnect (this); + dialogFirefoxMP.SetPosition(Gtk.WindowPosition.CenterOnParent); + dialogFirefoxMP.TransientFor = windowMain; + + }*/ objFirefox = new Firefox(); - objFirefox.AggregateStore(); + } + //objFirefox.AggregateStore(); notebookStores.GetNthPage(Common.STORE_FIREFOX).Visible = true; StorePolicyInterface.SetAggregationPolicy(Common.STORE_FIREFOX, true, storeID, 1); } else { - objFirefox = null; + //objFirefox = null; notebookStores.GetNthPage(Common.STORE_FIREFOX).Visible = false; StorePolicyInterface.SetAggregationPolicy(Common.STORE_FIREFOX, false, storeID, 1); } @@ -1447,13 +1501,13 @@ namespace Novell.CASA.GUI { if( null == objMozilla ) objMozilla = new Mozilla(); - objMozilla.AggregateStore(); + //objMozilla.AggregateStore(); notebookStores.GetNthPage(Common.STORE_MOZILLA).Visible = true; StorePolicyInterface.SetAggregationPolicy(Common.STORE_MOZILLA, true, storeID, 1); } else { - objMozilla = null; + //objMozilla = null; notebookStores.GetNthPage(Common.STORE_MOZILLA).Visible = false; StorePolicyInterface.SetAggregationPolicy(Common.STORE_MOZILLA, false, storeID, 1); } @@ -1463,13 +1517,13 @@ namespace Novell.CASA.GUI { if( null == objKdeWallet ) objKdeWallet = new KdeWallet(); - objKdeWallet.AggregateStore(); + //objKdeWallet.AggregateStore(); notebookStores.GetNthPage(Common.STORE_KDEWALLET).Visible = true; StorePolicyInterface.SetAggregationPolicy(Common.STORE_KDEWALLET, true, storeID, 1); } else { - objKdeWallet = null; + //objKdeWallet = null; notebookStores.GetNthPage(Common.STORE_KDEWALLET).Visible = false; StorePolicyInterface.SetAggregationPolicy(Common.STORE_KDEWALLET, false, storeID, 1); } @@ -1479,13 +1533,13 @@ namespace Novell.CASA.GUI { if( null == objGnomeKeyring ) objGnomeKeyring = new GnomeKeyring(); - objGnomeKeyring.AggregateStore(); + //objGnomeKeyring.AggregateStore(); notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING).Visible = true; StorePolicyInterface.SetAggregationPolicy(Common.STORE_GNOMEKEYRING, true, storeID, 1); } else { - objGnomeKeyring = null; + //objGnomeKeyring = null; notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING).Visible = false; StorePolicyInterface.SetAggregationPolicy(Common.STORE_GNOMEKEYRING, false, storeID, 1); } diff --git a/c_gui/Firefox.cs b/c_gui/Firefox.cs index c5368445..48af0b86 100644 --- a/c_gui/Firefox.cs +++ b/c_gui/Firefox.cs @@ -97,7 +97,7 @@ public class Firefox : Store { Logger.DbgLog("GUI:Firefox.Firefox() - BEGIN"); - /// SecretID TreeStore + /// SecretID TreeStore tvSecretIDFirefox = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvSecretIDFirefox"); tsSecretIDFirefox = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[])); tvSecretIDFirefox.AppendColumn("Secret ID",new CellRendererText(),"text",0); @@ -112,8 +112,8 @@ public class Firefox : Store tvNativeInfoFirefox.AppendColumn("NativeValue",new CellRendererText(),"text",1); tvNativeInfoFirefox.Model = tsNativeInfoFirefox; tvNativeInfoFirefox.ModifyBase(StateType.Normal,new Gdk.Color(0xff,0xff,0xe6)); - - Logger.DbgLog("GUI:Firefox.Firefox() - END"); + + Logger.DbgLog("GUI:Firefox.Firefox() - END"); } ///####################################################################### @@ -249,7 +249,6 @@ public class Firefox : Store { if( (null != keys[i]) && (null != values[i]) ) tsKeyValue.AppendValues(keys[i], values[i], "********", false, "No"); - //Console.WriteLine("Keys="+keys[i]+" , "+"Values="+values[i]); } tvKeyValue.Model = tsKeyValue; //entryKey.HasFocus = true; diff --git a/c_gui/StoreDataInterface.cs b/c_gui/StoreDataInterface.cs index 02c8682b..ce85baaf 100644 --- a/c_gui/StoreDataInterface.cs +++ b/c_gui/StoreDataInterface.cs @@ -39,15 +39,15 @@ namespace Novell.CASA.GUI { private static XmlDocument ccfDoc; private static AD ad; - private const string CCFXML_ELEMENT_MICASA_KEYCHAIN = "Keychain", + private const string CCFXML_ELEMENT_MICASA_KEYCHAIN = "Keychain", CCFXML_ELEMENT_GKEYRING_KEYRING = "Keyring", CCFXML_ELEMENT_KWALLET_WALLET = "Wallet", - CCFXML_ELEMENT_FIREFOX_PROFILE = "Profile", + CCFXML_ELEMENT_FIREFOX_PROFILE = "Profile", CCFXML_ELEMENT_SECRET = "Secret", CCFXML_ELEMENT_FOLDER = "Folder", CCFXML_ATTRIBUTE_FOLDERNAME = "Name", CCFXML_ELEMENT_TYPE = "Type", - CCFXML_ELEMENT_KEY = "Key", + CCFXML_ELEMENT_KEY = "Key", CCFXML_ELEMENT_VALUE = "Value", CCFXML_ELEMENT_TIME = "Time", CCFXML_ELEMENT_TIME_ZONE = "Zone", @@ -56,8 +56,8 @@ namespace Novell.CASA.GUI { CCFXML_ELEMENT_TIME_ACCESSED = "Accessed", CCFXML_ATTRIBUTE_ID = "ID", CCFXML_ATTRIBUTE_MICASA_SYNCH = "Synch", - CCFXML_ATTRIBUTE_GKEYRING_TYPE = "Type", - CCFXML_ATTRIBUTE_WALLETLASTACCESSEDTIME="LastAcctime"; + CCFXML_ATTRIBUTE_GKEYRING_TYPE = "Type", + CCFXML_ATTRIBUTE_WALLETLASTACCESSEDTIME = "LastAcctime"; @@ -139,10 +139,24 @@ namespace Novell.CASA.GUI { } + ///####################################################################### + /// MASTER PASSWORD + /// + /// + /// + public static bool IsMasterPasswordSet(int StoreID) + { + return( ad.IsMasterPasswordSet(StoreID) ); + } + + public static bool VerifyMasterPassword(string masterPassword, int StoreID) + { + return( ad.VerifyMasterPassword(masterPassword, StoreID) ); + } + ///####################################################################### - /// READ STORE - + /// READ STORE /// /// Gets the GUI Data store /// diff --git a/c_gui/images/casa.glade b/c_gui/images/casa.glade index 1253ee2c..79d09a91 100644 --- a/c_gui/images/casa.glade +++ b/c_gui/images/casa.glade @@ -10683,4 +10683,298 @@ Value: + + True + Firefox - Master Password + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ALWAYS + True + False + True + CASAicons.ico + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-help + True + GTK_RELIEF_NONE + True + -11 + + + + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + -7 + + + + + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + gtk-dialog-authentication + 6 + 0.5 + 0.5 + 0 + 0 + + + 6 + False + True + + + + + 4 + True + True + + + + + + True + False + 0 + + + + True + <b>Firefox Master Password authentication</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 5 + False + False + + + + + + True + The Firefox password manager is locked with +a master password. Please enter the master +password to view the secrets. + False + False + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 4 + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + 6 + True + 0 + 0.5 + GTK_SHADOW_IN + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + 6 + True + 1 + 2 + False + 6 + 6 + + + + True + Master Password : + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + True + False + 256 + + True + * + False + + + 1 + 2 + 0 + 1 + + + + + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + +