Changeset View
Changeset View
Standalone View
Standalone View
main_wayland.cpp
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Line(s) | 402 | #endif | |||
---|---|---|---|---|---|
403 | return s_fbdevPlugin; | 403 | return s_fbdevPlugin; | ||
404 | } | 404 | } | ||
405 | 405 | | |||
406 | static void disablePtrace() | 406 | static void disablePtrace() | ||
407 | { | 407 | { | ||
408 | #if HAVE_PR_SET_DUMPABLE | 408 | #if HAVE_PR_SET_DUMPABLE | ||
409 | // check whether we are running under a debugger | 409 | // check whether we are running under a debugger | ||
410 | const QFileInfo parent(QStringLiteral("/proc/%1/exe").arg(getppid())); | 410 | const QFileInfo parent(QStringLiteral("/proc/%1/exe").arg(getppid())); | ||
411 | if (parent.isSymLink() && parent.symLinkTarget().endsWith(QLatin1String("/gdb"))) { | 411 | if (parent.isSymLink() && | ||
412 | (parent.symLinkTarget().endsWith(QLatin1String("/gdb")) || | ||||
413 | parent.symLinkTarget().endsWith(QLatin1String("/gdbserver")))) { | ||||
412 | // debugger, don't adjust | 414 | // debugger, don't adjust | ||
413 | return; | 415 | return; | ||
414 | } | 416 | } | ||
415 | 417 | | |||
416 | // disable ptrace in kwin_wayland | 418 | // disable ptrace in kwin_wayland | ||
417 | prctl(PR_SET_DUMPABLE, 0); | 419 | prctl(PR_SET_DUMPABLE, 0); | ||
418 | #endif | 420 | #endif | ||
419 | #if HAVE_PROC_TRACE_CTL | 421 | #if HAVE_PROC_TRACE_CTL | ||
▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines |