aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2003-08-22 08:52:51 +0000
committerFrederic Lepied <flepied@mandriva.com>2003-08-22 08:52:51 +0000
commite9f02ca0bc58f68094905d1697dce42bcadb2d4b (patch)
tree2dfe7f1a1f8e07b25c418289dc4137342c348ef2
parentfb76397cfda127a26cda8c217c71b1b9c8f5d919 (diff)
downloadmsec-e9f02ca0bc58f68094905d1697dce42bcadb2d4b.tar
msec-e9f02ca0bc58f68094905d1697dce42bcadb2d4b.tar.gz
msec-e9f02ca0bc58f68094905d1697dce42bcadb2d4b.tar.bz2
msec-e9f02ca0bc58f68094905d1697dce42bcadb2d4b.tar.xz
msec-e9f02ca0bc58f68094905d1697dce42bcadb2d4b.zip
be carefull to use 1 or 0 instead of True and False in set_zero_one_variable
-rw-r--r--share/libmsec.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index 2cdca77..9bddf66 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -807,6 +807,12 @@ authorize_services.arg_trans = ALL_LOCAL_NONE_TRANS
################################################################################
+def boolean2bit(bool):
+ if bool:
+ return 1
+ else:
+ return 0
+
# helper function for enable_ip_spoofing_protection, accept_icmp_echo, accept_broadcasted_icmp_echo,
# accept_bogus_error_responses and enable_log_strange_packets.
def set_zero_one_variable(file, variable, value, secure_value, one_msg, zero_msg):
@@ -832,7 +838,7 @@ def set_zero_one_variable(file, variable, value, secure_value, one_msg, zero_msg
msg = _(zero_msg)
_interactive and log(msg)
- f.set_shell_variable(variable, value)
+ f.set_shell_variable(variable, boolean2bit(value))
################################################################################