mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
1bb2826ab1
@ -117,8 +117,9 @@ class Agent
|
|||||||
* @return \phpseclib\System\SSH\Agent
|
* @return \phpseclib\System\SSH\Agent
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function __construct()
|
function __construct($address = null)
|
||||||
{
|
{
|
||||||
|
if (!$address) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case isset($_SERVER['SSH_AUTH_SOCK']):
|
case isset($_SERVER['SSH_AUTH_SOCK']):
|
||||||
$address = $_SERVER['SSH_AUTH_SOCK'];
|
$address = $_SERVER['SSH_AUTH_SOCK'];
|
||||||
@ -130,6 +131,7 @@ class Agent
|
|||||||
user_error('SSH_AUTH_SOCK not found');
|
user_error('SSH_AUTH_SOCK not found');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->fsock = fsockopen('unix://' . $address, 0, $errno, $errstr);
|
$this->fsock = fsockopen('unix://' . $address, 0, $errno, $errstr);
|
||||||
if (!$this->fsock) {
|
if (!$this->fsock) {
|
||||||
|
Loading…
Reference in New Issue
Block a user