On Sun, 2012-04-15 at 00:26 +0100, Plug Gulp wrote: > I tried starting apache webserver and gdb from root login. Did not > help, because the valgrind is still launched from under apache user. > So I set the LOGNAME and HOST to "???" as suggested above and started > the webserver and gdb from root login. I also changed the permissions > of the FIFOs using a+rw. Here is the output of the commands: Here is another solution to try : * set the needed env var (LOGNAME, HOST) * make a copy of the vgdb executable * change owner of this vgdb file to be the user apache * set the user and group id bit (must be root or apache for that, I guess) chmod u+s vgdb chmod g+s vgdb
The above worked for me to then connect a root gdb+this vgdb to a Valgrind running under my user (I replaced apache by my own user) 3 notes: 1. once you have a "apache" vgdb, I believe root user should not be needed anymore. You should be able to use your own user, as the launched vgdb will "belong" to apache. 2. with the above hack, it seems some "ptrace" syscall done by vgdb are still not authorised. So, you might have to disable the ptrace things in vgdb using --max-invoke-ms=0 (see description and consequences in Valgrind manual). 3. IMPORTANT: of course, anybody else having access to this "apache" vgdb can then connect to any Valgrind gdbserver belonging to apache. In other words, other users on the same computer have "full" debuggability of all your apache Valgrind gdbserver as long as this "apache" vgdb copy exists. > > Hope this helps ... Hope this (really) helps (now) ... Philippe ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users