http://qa.mandrakesoft.com/show_bug.cgi?id=4629





------- Additional Comments From [EMAIL PROTECTED]  2003-09-08 02:10 -------
Created an attachment (id=593)
 --> (http://qa.mandrakesoft.com/attachment.cgi?id=593&action=view)
patch for set_zero_one_variable() in libmsec.py

use eval() when value is a string


-- 
Configure bugmail: http://qa.mandrakesoft.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


------- Reminder: -------
assigned_to: [EMAIL PROTECTED]
status: UNCONFIRMED
creation_date: 
description: 
In libmsec.py, set_zero_one_variable() can't handle "True" or "False" values
from /etc/sysctl.conf
See the attached patch for a possible solution.

For example, with this line in /etc/sysctl.conf :
net.ipv4.icmp_ignore_bogus_error_responses=False
msec dies with a ValueError exception :

Traceback (most recent call last):
  File "/usr/share/msec/msec.py", line 266, in ?
    commit_changes()
  File "/usr/share/msec/mseclib.py", line 24, in commit_changes
    apply(f[0], f[1])
  File "/usr/share/msec/libmsec.py", line 899, in accept_bogus_error_responses
    set_zero_one_variable(SYSCTLCONF,
'net.ipv4.icmp_ignore_bogus_error_responses', not arg, 1, 'Ignoring bogus icmp
error responses', 'Accepting bogus icmp error responses')
  File "/usr/share/msec/libmsec.py", line 820, in set_zero_one_variable
    val=int(val)
ValueError: invalid literal for int(): False

Reply via email to