[Qt-creator] Debugging as super-user
André Pönitz
andre.poenitz at nokia.com
Thu Apr 15 10:28:36 CEST 2010
On Thursday 15 April 2010 01:56:52 ext Bryce Schober wrote:
> yep. The problem is that I can't figure out how to get qt-creator to allow any wrapper to do the interactive stuff necessary to get through sudo, or preferrably gksu.
That's strange. Does mlockall() depend on group permissions
rather than user permissions?
If so, try running
echo '
#include <stdio.h>
#include <unistd.h>
#include <grp.h>
int main(int argc, char *argv[])
{
setreuid(geteuid(), geteuid());
setregid(getegid(), getegid());
gid_t zero = 0;
setgroups(1, &zero);
return execvp("/usr/bin/gdb", argv);
}
' | gcc -xc - -o /tmp/gdb-su && chmod +s /tmp/gdb-su
as root.
Running the resulting executable as ordinary user produces here:
ap at ...:~$ /tmp/gdb-su -quiet -ex 'shell id' -ex quit
warning: not using untrusted file "/home/ap/.gdbinit"
uid=0(root) gid=0(root) groups=0(root)
This looks pretty 'root-ish' to me...
Andre'
More information about the Qt-creator-old
mailing list