lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1479124543-30911-3-git-send-email-andreas.platschek@opentech.at>
Date:   Mon, 14 Nov 2016 11:55:43 +0000
From:   Andreas Platschek <andreas.platschek@...ntech.at>
To:     rostedt@...dmis.org
Cc:     linux-kernel@...r.kernel.org,
        Andreas Platschek <andreas.platschek@...ntech.at>
Subject: [PATCH 2/2] trace-cmd: python interface: add global variables to swig interface

Since trace-read.o is now linked into the python library, the global
variable silence_warnings and show_status (defined in trace-cmd.c for
trace-cmd) used in trace-read.c are also defined in the swig interface.

This way the two variables are exposed to python as
tracecmd.cvar.silence_warnings and tracecmd.cvar.show_status .

If this is not done, running tracecmd.py will fail due to undefined
symbols:

root@...ezy:/home/andi/working_git/trace-cmd# python tracecmd.py
Traceback (most recent call last):
  File "tracecmd.py", line 22, in <module>
    from ctracecmd import *
ImportError: /home/andi/working_git/trace-cmd/ctracecmd.so: undefined symbol: silence_warnings

Signed-off-by: Andreas Platschek <andreas.platschek@...ntech.at>
---
 ctracecmd.i |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ctracecmd.i b/ctracecmd.i
index e91d068..7800470 100644
--- a/ctracecmd.i
+++ b/ctracecmd.i
@@ -35,6 +35,8 @@ static int python_callback(struct trace_seq *s,
 			   void *context);
 
 static int skip_output = 0;
+int silence_warnings;
+int show_status;
 
 static void py_supress_trace_output(void)
 {
-- 
1.7.10.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ