debugger: proactively attempt to work around ubuntu's "kernel hardening" attempts

This commit is contained in:
hjk
2011-02-03 13:09:20 +01:00
parent ef1fd91fae
commit c6dc656a9d
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/types.h>
int _init(void)
{
prctl(0x59616d61, getppid(), 0, 0, 0);
puts("eeks\n");
return 0;
}

View File

@@ -0,0 +1,13 @@
include(../../qtcreatorlibrary.pri)
TEMPLATE = lib
TARGET = ptracepreload
CONFIG += shared
CONFIG -= qt
DESTDIR = $$IDE_LIBRARY_PATH
QMAKE_LFLAGS *= -nostdlib -ldl -lc
SOURCES = ptracepreload.c

View File

@@ -40,6 +40,10 @@ SUBDIRS = plugin_coreplugin \
plugin_macros \
debugger/dumper.pro
linux-* {
SUBDIRS += debugger/ptracepreload.pro
}
include(../../qtcreator.pri)
contains(QT_CONFIG, declarative) {