mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-22 04:29:01 +00:00
- stderr produced by Net_SSH2::exec() calls is now treated the same as stdin data
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@87 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
76e4066e94
commit
374c68c312
@ -60,7 +60,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVII Jim Wigginton
|
* @copyright MMVII Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: SSH2.php,v 1.37 2010-02-12 23:02:13 terrafrost Exp $
|
* @version $Id: SSH2.php,v 1.38 2010-02-15 22:24:08 terrafrost Exp $
|
||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1822,12 +1822,16 @@ class Net_SSH2 {
|
|||||||
if ($client_channel == NET_SSH2_CHANNEL_EXEC) {
|
if ($client_channel == NET_SSH2_CHANNEL_EXEC) {
|
||||||
$this->_send_channel_packet($client_channel, chr(0));
|
$this->_send_channel_packet($client_channel, chr(0));
|
||||||
}
|
}
|
||||||
|
// currently, there's only one possible value for $data_type_code: NET_SSH2_EXTENDED_DATA_STDERR
|
||||||
extract(unpack('Ndata_type_code/Nlength', $this->_string_shift($response, 8)));
|
extract(unpack('Ndata_type_code/Nlength', $this->_string_shift($response, 8)));
|
||||||
$data = $this->_string_shift($response, $length);
|
$data = $this->_string_shift($response, $length);
|
||||||
switch ($data_type_code) {
|
if ($client_channel == $channel) {
|
||||||
case NET_SSH2_EXTENDED_DATA_STDERR:
|
return $data;
|
||||||
$this->errors[] = 'SSH_MSG_CHANNEL_EXTENDED_DATA (SSH_EXTENDED_DATA_STDERR): ' . $data;
|
|
||||||
}
|
}
|
||||||
|
if (!isset($this->channel_buffers[$client_channel])) {
|
||||||
|
$this->channel_buffers[$client_channel] = array();
|
||||||
|
}
|
||||||
|
$this->channel_buffers[$client_channel][] = $data;
|
||||||
break;
|
break;
|
||||||
case NET_SSH2_MSG_CHANNEL_REQUEST:
|
case NET_SSH2_MSG_CHANNEL_REQUEST:
|
||||||
extract(unpack('Nlength', $this->_string_shift($response, 4)));
|
extract(unpack('Nlength', $this->_string_shift($response, 4)));
|
||||||
|
Loading…
Reference in New Issue
Block a user