Bug 175455. Prevent crash when entering MP that is too short and during an upgrade.
This commit is contained in:
parent
d0ecc6faef
commit
43fa2efaf3
@ -1,3 +1,8 @@
|
|||||||
|
--------------------------------------------------------------------
|
||||||
|
Mon Jun 05 15:30:53 MST 2006 - jnorman@novell.com
|
||||||
|
- Bug 175455. Prevent crash when entering MP that is too short and
|
||||||
|
during an upgrade.
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
Thursday May 25 16:15:53 MST 2006 - jnorman@novell.com
|
Thursday May 25 16:15:53 MST 2006 - jnorman@novell.com
|
||||||
- Bug 178796: change the way we generate the new salt so that
|
- Bug 178796: change the way we generate the new salt so that
|
||||||
|
@ -133,7 +133,8 @@ namespace Novell.CASA.GUI
|
|||||||
|
|
||||||
|
|
||||||
[Glade.Widget]
|
[Glade.Widget]
|
||||||
Gtk.DrawingArea drawingarea1;
|
Gtk.DrawingArea drawingarea1,
|
||||||
|
drawingarea2;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -225,10 +226,13 @@ namespace Novell.CASA.GUI
|
|||||||
if (Common.IsTrayAvailable()) // && Common.IsArgSet(args, Common.ARG_SHOW_TRAY_ICON))
|
if (Common.IsTrayAvailable()) // && Common.IsArgSet(args, Common.ARG_SHOW_TRAY_ICON))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (!Common.IsArgSet(args, Common.ARG_NO_TRAY_ICON))
|
||||||
{
|
{
|
||||||
if (mCasaTray == null)
|
if (mCasaTray == null)
|
||||||
mCasaTray = new CasaTray(this);
|
mCasaTray = new CasaTray(this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Logger.DbgLog("CasaMain:EXCEPTION"+e.ToString());
|
Logger.DbgLog("CasaMain:EXCEPTION"+e.ToString());
|
||||||
@ -505,7 +509,7 @@ namespace Novell.CASA.GUI
|
|||||||
|
|
||||||
private bool DeleteMiCasaFiles()
|
private bool DeleteMiCasaFiles()
|
||||||
{
|
{
|
||||||
string[] faFiles = Directory.GetFiles(GetUserHomeDir(), ".miCASA*");
|
string[] faFiles = Directory.GetFiles(Common.GetUserHomeDir(), ".miCASA*");
|
||||||
bool bDeletedFiles = true;
|
bool bDeletedFiles = true;
|
||||||
|
|
||||||
for (int i=0; i<faFiles.Length; i++)
|
for (int i=0; i<faFiles.Length; i++)
|
||||||
@ -611,10 +615,18 @@ namespace Novell.CASA.GUI
|
|||||||
internal void on_buttonRetryShortPassword_clicked(object obj, EventArgs args)
|
internal void on_buttonRetryShortPassword_clicked(object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
dialogShortPassword.Destroy();
|
dialogShortPassword.Destroy();
|
||||||
entryMasterPassword3.Text = "";
|
|
||||||
|
if (entryMasterPassword4 != null)
|
||||||
|
{
|
||||||
entryMasterPassword4.Text = "";
|
entryMasterPassword4.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entryMasterPassword3 != null)
|
||||||
|
{
|
||||||
|
entryMasterPassword3.Text = "";
|
||||||
entryMasterPassword3.HasFocus = true;
|
entryMasterPassword3.HasFocus = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args)
|
internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
@ -671,7 +683,7 @@ namespace Novell.CASA.GUI
|
|||||||
Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - BEGIN");
|
Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - BEGIN");
|
||||||
|
|
||||||
string MICASA_PASSCODE_BY_MASTER_PASSWD_FILE = "/.miCASAPCByMPasswd";
|
string MICASA_PASSCODE_BY_MASTER_PASSWD_FILE = "/.miCASAPCByMPasswd";
|
||||||
string fileName = GetUserHomeDir() + MICASA_PASSCODE_BY_MASTER_PASSWD_FILE;
|
string fileName = Common.GetUserHomeDir() + MICASA_PASSCODE_BY_MASTER_PASSWD_FILE;
|
||||||
|
|
||||||
Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - END");
|
Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - END");
|
||||||
return (File.Exists(fileName));
|
return (File.Exists(fileName));
|
||||||
@ -693,28 +705,16 @@ namespace Novell.CASA.GUI
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// check for existence of persistent files
|
// check for existence of persistent files
|
||||||
string MICASA_PASSCODE_BY_DESKTOP_FILE = "/.miCASAPCByDesktop";
|
string sHomeDir = Common.GetUserHomeDir();
|
||||||
string MICASA_KEY_FILE = "/.miCASAKey";
|
|
||||||
string MICASA_PERSISTENCE_FILE = "/.miCASA";
|
|
||||||
string MICASA_VALIDATION_FILE = "/.miCASAValidate";
|
|
||||||
string sHomeDir = GetUserHomeDir();
|
|
||||||
|
|
||||||
Logger.DbgLog("GUI:CasaMain.DoesPersistentFilesExist() - END");
|
Logger.DbgLog("GUI:CasaMain.DoesPersistentFilesExist() - END");
|
||||||
return (File.Exists(sHomeDir + MICASA_PERSISTENCE_FILE)
|
return (File.Exists(sHomeDir + Common.MICASA_PERSISTENCE_FILE)
|
||||||
&& File.Exists(sHomeDir + MICASA_KEY_FILE)
|
&& File.Exists(sHomeDir + Common.MICASA_KEY_FILE)
|
||||||
&& File.Exists(sHomeDir + MICASA_PASSCODE_BY_DESKTOP_FILE)
|
&& File.Exists(sHomeDir + Common.MICASA_PASSCODE_BY_DESKTOP_FILE)
|
||||||
&& File.Exists(sHomeDir + MICASA_VALIDATION_FILE));
|
&& File.Exists(sHomeDir + Common.MICASA_VALIDATION_FILE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetUserHomeDir()
|
|
||||||
{
|
|
||||||
if (Common.IS_LINUX)
|
|
||||||
return Environment.GetEnvironmentVariable("HOME");
|
|
||||||
else
|
|
||||||
return Environment.GetEnvironmentVariable("USERPROFILE");
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetLocalUsername()
|
private string GetLocalUsername()
|
||||||
{
|
{
|
||||||
if (Common.IS_LINUX)
|
if (Common.IS_LINUX)
|
||||||
@ -1249,6 +1249,8 @@ namespace Novell.CASA.GUI
|
|||||||
mmiOptions.Sensitive = false;
|
mmiOptions.Sensitive = false;
|
||||||
mmiEdit.Sensitive = false;
|
mmiEdit.Sensitive = false;
|
||||||
m_bGuiLocked = true;
|
m_bGuiLocked = true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void UnlockGUI()
|
internal void UnlockGUI()
|
||||||
@ -1835,6 +1837,10 @@ namespace Novell.CASA.GUI
|
|||||||
|
|
||||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogAbout", null);
|
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogAbout", null);
|
||||||
gxmlTemp.Autoconnect (this);
|
gxmlTemp.Autoconnect (this);
|
||||||
|
|
||||||
|
Gdk.Color color = new Gdk.Color(90, 77, 189);
|
||||||
|
drawingarea2.ModifyBg(Gtk.StateType.Normal, color);
|
||||||
|
|
||||||
dialogAbout.TransientFor = windowMain;
|
dialogAbout.TransientFor = windowMain;
|
||||||
Logger.DbgLog("GUI:CasaMain.About() - END");
|
Logger.DbgLog("GUI:CasaMain.About() - END");
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,11 @@ public class Common
|
|||||||
DebugLogFile = null;
|
DebugLogFile = null;
|
||||||
|
|
||||||
public static int MAX_LEN = 512;
|
public static int MAX_LEN = 512;
|
||||||
|
public static string MICASA_PASSCODE_BY_DESKTOP_FILE = "/.miCASAPCByDesktop";
|
||||||
|
public static string MICASA_PASSCODE_BY_MP_FILE = "/.miCASAPCByMPasswd";
|
||||||
|
public static string MICASA_KEY_FILE = "/.miCASAKey";
|
||||||
|
public static string MICASA_PERSISTENCE_FILE = "/.miCASA";
|
||||||
|
public static string MICASA_VALIDATION_FILE = "/.miCASAValidate";
|
||||||
|
|
||||||
static Char[] SpecialCharacters = new Char[]{ '*', ':', '\'', '\\', '&', '=', '<', '>' };
|
static Char[] SpecialCharacters = new Char[]{ '*', ':', '\'', '\\', '&', '=', '<', '>' };
|
||||||
|
|
||||||
@ -70,6 +75,8 @@ public class Common
|
|||||||
';', '\"', '\'', '<', '>',
|
';', '\"', '\'', '<', '>',
|
||||||
',', '.', '?', '/', '!'};
|
',', '.', '?', '/', '!'};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
///##############################################################
|
///##############################################################
|
||||||
/// SPI CONSTANTS
|
/// SPI CONSTANTS
|
||||||
@ -120,9 +127,12 @@ public class Common
|
|||||||
|
|
||||||
///##############################################################
|
///##############################################################
|
||||||
/// ARG CONSTANTS
|
/// ARG CONSTANTS
|
||||||
|
///
|
||||||
|
public static string ARG_NO_TRAY_ICON = "-notray";
|
||||||
public static string ARG_SHOW_TRAY_ICON = "-tray";
|
public static string ARG_SHOW_TRAY_ICON = "-tray";
|
||||||
public static string ARG_DEBUG = "-debug";
|
public static string ARG_DEBUG = "-debug";
|
||||||
|
|
||||||
|
|
||||||
///#############################################################
|
///#############################################################
|
||||||
///CasaIcons path
|
///CasaIcons path
|
||||||
#if W32
|
#if W32
|
||||||
@ -407,6 +417,15 @@ public class Common
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string GetUserHomeDir()
|
||||||
|
{
|
||||||
|
if (Common.IS_LINUX)
|
||||||
|
return Environment.GetEnvironmentVariable("HOME");
|
||||||
|
else
|
||||||
|
return Environment.GetEnvironmentVariable("USERPROFILE");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user