[Qt-creator] Debugging as super-user
Andre Poenitz
andre.poenitz at mathematik.tu-chemnitz.de
Wed Apr 14 21:42:48 CEST 2010
> On Tue, Apr 13, 2010 at 09:12:07AM -0700, Bryce Schober wrote:
> > Is there a way to get Qt Creator to launch gdb as super-user? Obviously, I
> > can start Qt Creator as super-user, but that leaves all the modified source
> > and outputs with superuser perms, which screws up normal-user operations
> > like svn, etc. I tried several different ways of wrapping gdb, and
> > specifying the wrapper in Qt creator's gdb settings, but have had no
> > success.
Would
echo '
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
setreuid(geteuid(), geteuid());
setregid(getegid(), getegid());
return execvp("/usr/bin/gdb", argv);
}
' | gcc -xc - -o /tmp/gdb-su && chmod +s /tmp/gdb-su
as root and pointing Qt Creator to /tmp/gdb-su in the 'gdb Location'
setting do the trick?
Note that this would give anyone on the system a root shell.
Andre'
More information about the Qt-creator-old
mailing list