Author: jdsn
Date: Thu Apr 23 21:23:35 2009
New Revision: 56953
URL: http://svn.opensuse.org/viewcvs/yast?rev=56953&view=rev
Log:
check boolean values also for nil to prevent crashes (bnc#463800)
Modified:
trunk/registration/package/yast2-registration.changes
trunk/registration/src/modules/Register.ycp
Modified: trunk/registration/package/yast2-registration.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=56953&r1=56952&r2=56953&view=diff
==============================================================================
--- trunk/registration/package/yast2-registration.changes (original)
+++ trunk/registration/package/yast2-registration.changes Thu Apr 23 21:23:35 2009
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu Apr 23 21:15:50 CEST 2009 - jdsn@suse.de
+
+- check boolean values also for nil to prevent crashes (bnc#463800)
+
+-------------------------------------------------------------------
Mon Feb 23 12:50:14 CET 2009 - jdsn@suse.de
- reload SourceManager after registration (bnc#468449)
Modified: trunk/registration/src/modules/Register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register.ycp?rev=56953&r1=56952&r2=56953&view=diff
==============================================================================
--- trunk/registration/src/modules/Register.ycp (original)
+++ trunk/registration/src/modules/Register.ycp Thu Apr 23 21:23:35 2009
@@ -784,11 +784,11 @@
*/
void write_config()
{
- SCR::Write(.sysconfig.suse_register.SUBMIT_OPTIONAL, sformat("%1", submit_optional ? true:false ));
- SCR::Write(.sysconfig.suse_register.SUBMIT_HWDATA, sformat("%1", submit_hwdata ? true:false ));
+ SCR::Write(.sysconfig.suse_register.SUBMIT_OPTIONAL, sformat("%1", submit_optional == true ? true:false ));
+ SCR::Write(.sysconfig.suse_register.SUBMIT_HWDATA, sformat("%1", submit_hwdata == true ? true:false ));
if ( register_regularly == nil ) register_regularly = false;
- SCR::Execute(.target.bash, sformat("%1 /var/lib/suseRegister/neverRegisterOnBoot", register_regularly ? "rm -f ":"touch " ));
+ SCR::Execute(.target.bash, sformat("%1 /var/lib/suseRegister/neverRegisterOnBoot", register_regularly == true ? "rm -f ":"touch " ));
// touch a flag file for opensuseupdater
SCR::Execute(.target.bash, sformat("touch /var/lib/YaST2/registrationDidRun"));
}
@@ -1370,11 +1370,12 @@
map ui = UI::GetDisplayInfo();
boolean debugMode = (boolean) ui["y2debug"]:false;
+ // take care for nil booleans (bnc#463800)
map