mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Add some comment about usage of environment auth
This commit is contained in:
parent
fdb76683b2
commit
0520cba7dc
1 changed files with 1 additions and 1 deletions
|
|
@ -202,11 +202,11 @@ class Share implements IShare {
|
||||||
$command = Server::CLIENT . ' -U ' . escapeshellarg($this->server->getUser()) .
|
$command = Server::CLIENT . ' -U ' . escapeshellarg($this->server->getUser()) .
|
||||||
' //' . $this->server->getHost() . '/' . $this->name
|
' //' . $this->server->getHost() . '/' . $this->name
|
||||||
. ' -c \'get ' . $source . ' -\'';
|
. ' -c \'get ' . $source . ' -\'';
|
||||||
|
// because we're piping the files content over STOUT using the password prompt is no option here
|
||||||
$connection = new Connection($command, array(
|
$connection = new Connection($command, array(
|
||||||
'PASSWD' => $this->server->getPassword()
|
'PASSWD' => $this->server->getPassword()
|
||||||
));
|
));
|
||||||
$fh = $connection->getOutputStream();
|
$fh = $connection->getOutputStream();
|
||||||
|
|
||||||
//save the connection as context of the stream to prevent it going out of scope and cleaning up the resource
|
//save the connection as context of the stream to prevent it going out of scope and cleaning up the resource
|
||||||
stream_context_set_option($fh, 'file', 'connection', $connection);
|
stream_context_set_option($fh, 'file', 'connection', $connection);
|
||||||
return $fh;
|
return $fh;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue