aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-01-20 15:53:46 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-01-20 15:53:46 +0000
commitf6d021cd2c13abbe9dd2e23e364b0337248d3928 (patch)
tree32556c3f3edca1557affbe9ca451fbc4752f49fc /src
parentdaee653c15a4c7dd65d95fb3d7d83004e0d6ce61 (diff)
downloadmsec-f6d021cd2c13abbe9dd2e23e364b0337248d3928.tar
msec-f6d021cd2c13abbe9dd2e23e364b0337248d3928.tar.gz
msec-f6d021cd2c13abbe9dd2e23e364b0337248d3928.tar.bz2
msec-f6d021cd2c13abbe9dd2e23e364b0337248d3928.tar.xz
msec-f6d021cd2c13abbe9dd2e23e364b0337248d3928.zip
Updated function help.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/msec/help_draksec.py28
-rwxr-xr-xsrc/msec/libmsec.py2
2 files changed, 29 insertions, 1 deletions
diff --git a/src/msec/help_draksec.py b/src/msec/help_draksec.py
index 48f0df0..da6026c 100755
--- a/src/msec/help_draksec.py
+++ b/src/msec/help_draksec.py
@@ -13,6 +13,7 @@ from libmsec import MSEC, Log
help_perl_file = 'help.pm'
help_python_file = 'help.py'
+help_wiki_file = 'help.wiki'
header_perl = '''package security::help;
# !! THIS FILE WAS AUTO-GENERATED BY draksec_help.py !!
@@ -41,6 +42,26 @@ HELP = {
footer_perl = ''');
'''
+header_wiki = '''The following functionality is supported by MSEC:
+'''
+
+footer_wiki = '''
+'''
+
+header_python = '''# libmsec documentation for python.
+
+import gettext
+
+# localization
+try:
+ cat = gettext.Catalog('msec')
+ _ = cat.gettext
+except IOError:
+ _ = str
+
+HELP = {
+'''
+
footer_python = '''}
'''
@@ -51,8 +72,12 @@ function_str_perl = ''''%s' => N("%s"),
function_str_python = '''
'%s': _("%s"), '''
+function_str_wiki = ''';%s: %s
+'''
+
help_perl = open(help_perl_file, "w")
help_python = open(help_python_file, "w")
+help_wiki = open(help_wiki_file, "w")
# process all configuration parameters
log = Log(log_syslog=False, log_file=False)
@@ -60,6 +85,7 @@ msec = MSEC(log)
print >>help_perl, header_perl
print >>help_python, header_python
+print >>help_wiki, header_wiki
for variable in config.SETTINGS:
callback, params = config.SETTINGS[variable]
@@ -67,8 +93,10 @@ for variable in config.SETTINGS:
if func:
print >>help_perl, function_str_perl % (variable, func.__doc__.strip())
print >>help_python, function_str_python % (variable, func.__doc__.strip())
+ print >>help_wiki, function_str_wiki % (variable, func.__doc__.strip())
print >>help_perl, footer_perl
print >>help_python, footer_python
+print >>help_wiki, footer_wiki
# draksec_help.py ends here
diff --git a/src/msec/libmsec.py b/src/msec/libmsec.py
index c9cc110..89af772 100755
--- a/src/msec/libmsec.py
+++ b/src/msec/libmsec.py
@@ -1275,7 +1275,7 @@ class MSEC:
self.set_zero_one_variable(SYSCTLCONF, 'net.ipv4.conf.all.rp_filter', arg, 'Enabling ip spoofing protection', 'Disabling ip spoofing protection')
def enable_dns_spoofing_protection(self, arg, alert=1):
- ''' Enable/Disable name resolution spoofing protection. If \\fIalert\\fP is true, also reports to syslog.'''
+ ''' Enable/Disable name resolution spoofing protection.'''
hostconf = self.configfiles.get_config_file(HOSTCONF)
val = hostconf.get_match('nospoof\s+on')