From 3b1a9d1f8db031563903a493be755419d7ba6620 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 4 Jan 2011 16:23:21 +0100 Subject: dump_dir: make chown'ing of new files optional - needed for non-root usage Signed-off-by: Denys Vlasenko --- src/report-python/test_setroubleshoot_example2 | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 src/report-python/test_setroubleshoot_example2 (limited to 'src/report-python/test_setroubleshoot_example2') diff --git a/src/report-python/test_setroubleshoot_example2 b/src/report-python/test_setroubleshoot_example2 new file mode 100755 index 00000000..8aebcdfe --- /dev/null +++ b/src/report-python/test_setroubleshoot_example2 @@ -0,0 +1,27 @@ +#!/usr/bin/python + +import report +import report.io +import report.io.GTKIO +import report.accountmanager + +accounts = report.accountmanager.AccountManager() + +signature = report.createAlertSignature("selinux-policy", + "setroubleshoot", + "self.siginfo.get_hash()", + "self.summary", + "content") + +# Won't send log anywhere: +#rc = report.report(signature, report.io.GTKIO.GTKIO(accounts)) + +# report.report() + logging: +def logging_callback(line): + print "LOG:", line + return +state = report.run_event_state() +state.logging_callback = logging_callback +rc = state.run_event_on_crash_data(signature, "report") + +print "rc:", rc -- cgit