setroubleshoot: syntax error...

Jay Cliburn jacliburn at bellsouth.net
Fri Jul 21 15:54:42 UTC 2006


Tom London wrote:
> Fixed spurrious '.' at end of line 35 in secure_mode_insmod.py.
> 
> Now get:
> 
> 2006-07-20 10:17:48,314 [plugin.DEBUG] importing
> /usr/share/setroubleshoot/plugins/secure_mode_policyload as
> plugins.secure_mode_policyload
> 2006-07-20 10:17:48,315 [avc.ERROR] Unexpected exception expected an
> indented block (secure_mode_policyload.py, line 45)
> Traceback (most recent call last):
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 96, in ?
>    analyze_thread = Analyze()
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 19, in __init__
>    self.plugins = LoadPlugins()
>  File "/usr/lib/python2.4/site-packages/setroubleshoot/util.py", line
> 175, in LoadPlugins
>    mod = imp.load_module(moduleName, *imp.find_module(pluginName,
> [plugin_dir]))
> IndentationError: expected an indented block
> (secure_mode_policyload.py, line 45)
> 2006-07-20 10:17:48,702 [avc.ERROR] Traceback (most recent call last):
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 96, in ?
>    analyze_thread = Analyze()
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 19, in __init__
>    self.plugins = LoadPlugins()
>  File "/usr/lib/python2.4/site-packages/setroubleshoot/util.py", line
> 175, in LoadPlugins
>    mod = imp.load_module(moduleName, *imp.find_module(pluginName,
> [plugin_dir]))
> IndentationError: expected an indented block
> (secure_mode_policyload.py, line 45)
> Traceback (most recent call last):
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 96, in ?
>    analyze_thread = Analyze()
>  File "/usr/lib/audit/setroubleshoot_dispatcher", line 19, in __init__
>    self.plugins = LoadPlugins()
>  File "/usr/lib/python2.4/site-packages/setroubleshoot/util.py", line
> 175, in LoadPlugins
>    mod = imp.load_module(moduleName, *imp.find_module(pluginName,
> [plugin_dir]))
> IndentationError: expected an indented block
> (secure_mode_policyload.py, line 45)
>

I get a different error in setroubleshoot-0.9-1.  Where should these be 
reported?

[root at osprey setroubleshoot-0.9]# setroubleshoot /var/log/messages
Traceback (most recent call last):
   File "/usr/sbin/setroubleshoot", line 74, in ?
     if plugin.analyze(avc):
   File "/usr/share/setroubleshoot/plugins/allow_java_execstack.py", 
line 52, in analyze
     if re.match("javaplugin_t$", avc.scontext.type) is not None \
   File "/usr/lib64/python2.4/sre.py", line 129, in match
     return _compile(pattern, flags).match(string)
TypeError: expected string or buffer



Also, there appears to be a format bug in the Usage message:

[root at osprey setroubleshoot-0.9]# setroubleshoot --help

     sys.argv[0] file [file ...]
     -h --help
     -p glob --plugin=glob       load only plugin's whose name matches glob





More information about the fedora-selinux-list mailing list