|
From: Salil G. <sa...@gm...> - 2007-10-26 09:40:11
|
Hello
I am facing a problem with using valgrind in sudo environment. What is
happening is in our program we are using sudo for executing some program. So
when I try to run the top level application with valgrind it fails saying
that
:createProc(): Error in exec script /usr/bin/sudo Error 13|
Then during debuggin we found that if I try to execute a shell script which
uses sudo, it fails.
The following is the scenario.
-bash-2.05b$ cat one.sh
#!/bin/bash
sudo -u root /sbin/ifconfig | grep inet
# end
-bash-2.05b$ sudo ./one.sh
inet addr:13.28.14.27 Bcast:13.28.14.127 Mask:255.255.255.128
inet addr:127.0.0.1 Mask:255.0.0.0
-bash-2.05b$ valgrind -v ./one.sh
produces lots of output but towards the end I have seen the following
==9040== by 0x808CD28: find_user_command (in /bin/bash)
==9040== by 0x808CF1C: search_for_command (in /bin/bash)
==9040== by 0x806A832: (within /bin/bash)
==9040== by 0x8069941: (within /bin/bash)
==9040== by 0x8066D9B: execute_command_internal (in /bin/bash)
==9040== by 0x8067C74: (within /bin/bash)
--9039-- REDIR: 0x40C4830 (strnlen) redirected to 0x401BE50 (strnlen)
--9039-- REDIR: 0x40BD2B0 (realloc) redirected to 0x401B6E4 (realloc)
./one.sh: line 3:* /usr/bin/sudo: Permission denied*
==9039==
==9039== ERROR SUMMARY: 404 errors from 113 contexts (suppressed: 22 from 1)
==9039==
==9039== 1 errors in context 1 of 113:
==9039== Invalid read of size 8
==9039== at 0x403A657: strlen (in /lib/csa/sse2/sse2_boost.so.1)
==9039== by 0x806ED80: put_command_name_into_env (in /bin/bash)
==9039== by 0x806A845: (within /bin/bash)
==9039== by 0x8069941: (within /bin/bash)
executed the following
-bash-2.05b$ valgrind sudo
valgrind: /usr/bin/sudo: Permission denied
Is there any problem is using sudo in valgrind environment or rather running
valgrind in sudo environment.
thanks
Salil
|
|
From: Salil G. <sa...@gm...> - 2007-10-27 03:00:12
|
I have sent this mail yesterday. But some how it is not being displayed in
the archive. So I am sending this again. Sorry if it a duplicate.
Hello
I am facing a problem with using valgrind in sudo environment. What is
happening is in our program we are using sudo for executing some program. So
when I try to run the top level application with valgrind it fails saying
that
:createProc(): Error in exec script /usr/bin/sudo Error 13|
Then during debuggin we found that if I try to execute a shell script which
uses sudo, it fails.
The following is the scenario.
-bash-2.05b$ cat one.sh
#!/bin/bash
sudo -u root /sbin/ifconfig | grep inet
# end
-bash-2.05b$ sudo ./one.sh
inet addr:13.28.14.27 Bcast:13.28.14.127 Mask:255.255.255.128
inet addr:127.0.0.1 Mask:255.0.0.0
-bash-2.05b$ valgrind -v ./one.sh
produces lots of output but towards the end I have seen the following
==9040== by 0x808CD28: find_user_command (in /bin/bash)
==9040== by 0x808CF1C: search_for_command (in /bin/bash)
==9040== by 0x806A832: (within /bin/bash)
==9040== by 0x8069941: (within /bin/bash)
==9040== by 0x8066D9B: execute_command_internal (in /bin/bash)
==9040== by 0x8067C74: (within /bin/bash)
--9039-- REDIR: 0x40C4830 (strnlen) redirected to 0x401BE50 (strnlen)
--9039-- REDIR: 0x40BD2B0 (realloc) redirected to 0x401B6E4 (realloc)
./one.sh: line 3:* /usr/bin/sudo: Permission denied*
==9039==
==9039== ERROR SUMMARY: 404 errors from 113 contexts (suppressed: 22 from 1)
==9039==
==9039== 1 errors in context 1 of 113:
==9039== Invalid read of size 8
==9039== at 0x403A657: strlen (in /lib/csa/sse2/sse2_boost.so.1)
==9039== by 0x806ED80: put_command_name_into_env (in /bin/bash)
==9039== by 0x806A845: (within /bin/bash)
==9039== by 0x8069941: (within /bin/bash)
executed the following
-bash-2.05b$ valgrind sudo
valgrind: /usr/bin/sudo: Permission denied
Is there any problem is using sudo in valgrind environment or rather running
valgrind in sudo environment.
thanks
Salil
|