Integrating valgrind with sftp-server

Kaushik Muthuravichandran m.kaushik at gmail.com
Wed Jul 17 20:44:31 EST 2013


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

But I am not able to connect to the sftp-server. These are the last
messages that the client logs.

<snip>
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cfd -1)

debug3: channel 0: close_fds r -1 w -1 e 6 c -1
debug1: fd 0 clearing O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 126
Connection closed
</snip>

It works fine when valgrind is not added to the sftp-server command. What
is the right way to go about it ? I am using openssh 6.2p2 on Centos 5.

Thanks!
Kaushik


More information about the openssh-unix-dev mailing list