Integrating valgrind with sftp-server
Kaushik Muthuravichandran
m.kaushik at gmail.com
Thu Jul 18 20:34:34 EST 2013
Hi Damien,
I tried replacing the log file with $HOME in the Subsystem line below but
that still fails.
The alternate way that you suggested works fine. With a limited amount of
testing that I did, the valgrind report looks clean.
Thanks for your help.
Regards,
Kaushik
On Thu, Jul 18, 2013 at 8:36 AM, Damien Miller <djm at mindrot.org> wrote:
>
>
> On Wed, 17 Jul 2013, Kaushik Muthuravichandran wrote:
>
> > Hi,
> >
> > I am trying to integrate valgrind with sftp-server. I've replaced the
> sftp
> > subsystem line in /etc/ssh/sshd_config file as follows:
> >
> > Subsystem sftp /usr/bin/valgrind --log-file=~/abc
> > --trace-children=yes /root/openssh-6.2p2/sftp-server
>
> It's probably because of the '~' in the path:
>
> valgrind: --log-file: filename begins with '~'
> valgrind: You probably expected the shell to expand the '~', but it
> valgrind: didn't. The rules for '~'-expansion vary from shell to shell.
> valgrind: You might have more luck using $HOME instead.
> valgrind: Bad option: --log-file=~/sftp-server.valgrind
> valgrind: Use --help for more information or consult the user manual.
>
> You don't need to run sftp-server via sshd to test it anyway:
>
> cat > ~/sftp-server-valgrind << EOF
> #!/bin/bash
>
> valgrind --log-file=${HOME}/sftp-server.valgrind
> /path/to/openssh/sftp-server
> EOF
>
> sftp -D $HOME/sftp-server-valgrind
>
> should do what you want.
>
> -d
>
>
More information about the openssh-unix-dev
mailing list