bug 2662290; properly reading registry key to determine Install_Dir in fwb-lm

This commit is contained in:
Vadim Kurland
2009-03-04 17:27:21 +00:00
parent 8bf0b719b3
commit 12a8f653cf
5 changed files with 28 additions and 11 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 772
#define BUILD_NUM 773
+8
View File
@@ -1,3 +1,11 @@
2009-03-04 vadim <vadim@vk.crocodile.org>
* iosacl.cpp (main), FirewallDialog::platformChanged(): fixed bug
#2662290: "fwb_iosacl crash after firewall converted from
iptables". If user changed platform setting of the firewall
object, the program preserved its old version which was invalid
for the new platform.
2009-03-02 vadim <vadim@vk.crocodile.org>
* RoutingCompiler_ipt_writers.cpp (PrintRule::processNext): finish
+1 -1
View File
@@ -179,7 +179,7 @@ void FirewallDialog::platformChanged()
]->getResourceStr("/FWBuilderResources/Target/supported_os").c_str();
if (so.isEmpty()) return;
QString ho=so.section(",",0);
QString ho = so.section(",",0);
setHostOS( m_dialog->hostOS, ho.toLatin1().constData() );
QString pl = readPlatform(m_dialog->platform);
+6 -5
View File
@@ -33,9 +33,6 @@
<property name="spacing" >
<number>2</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item>
<widget class="QFrame" name="frame3" >
<property name="sizePolicy" >
@@ -524,7 +521,7 @@
<sender>platform</sender>
<signal>activated(int)</signal>
<receiver>FirewallDialog_q</receiver>
<slot>changed()</slot>
<slot>platformChanged()</slot>
<hints>
<hint type="sourcelabel" >
<x>20</x>
@@ -556,7 +553,7 @@
<sender>hostOS</sender>
<signal>activated(int)</signal>
<receiver>FirewallDialog_q</receiver>
<slot>changed()</slot>
<slot>hostOSChanged()</slot>
<hints>
<hint type="sourcelabel" >
<x>20</x>
@@ -569,4 +566,8 @@
</hints>
</connection>
</connections>
<slots>
<slot>platformChanged()</slot>
<slot>hostOSChanged()</slot>
</slots>
</ui>
+12 -4
View File
@@ -262,6 +262,17 @@ int main(int argc, char * const * argv)
string fwvers = fw->getStr("version");
if (fwvers == "") fw->setStr("version", "12.x");
string platform = fw->getStr("platform");
string clearACLCmd = Resources::platform_res[platform]->getResourceStr(
string("/FWBuilderResources/Target/options/") +
"version_" + fwvers + "/iosacl_commands/clear_ip_acl");
if (clearACLCmd.empty())
{
// incorrect version. This could have happened if user converted
// firewall platform. See bug #2662290
fw->setStr("version", "12.x");
}
bool ios_acl_basic=options->getBool("ios_acl_basic");
bool ios_acl_no_clear=options->getBool("ios_acl_no_clear");
bool ios_acl_substitution=options->getBool("ios_acl_substitution");
@@ -490,11 +501,8 @@ int main(int argc, char * const * argv)
ofile << endl;
string vers = fw->getStr("version");
string platform = fw->getStr("platform");
ofile << "!" << endl;
ofile << "!" << " Compiled for " << platform << " " << vers << endl;
ofile << "!" << " Compiled for " << platform << " " << fwvers << endl;
ofile << "!" << endl;
ofile << "!" << MANIFEST_MARKER << "* " << ofname << endl;