Merge pull request #734 from Gryd3/patch-1

append a rand int to the socket name.
This commit is contained in:
Jim Salter 2022-04-08 17:18:23 -04:00 committed by GitHub
commit b0a71f763a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1473,7 +1473,7 @@ sub getssh {
if ($rhost ne "") {
if ($remoteuser eq 'root' || $args{'no-privilege-elevation'}) { $isroot = 1; } else { $isroot = 0; }
# now we need to establish a persistent master SSH connection
$socket = "/tmp/syncoid-$rhost-" . time();
$socket = "/tmp/syncoid-$rhost-" . time() . "-" . int(rand(10000));
open FH, "$sshcmd -M -S $socket -o ControlPersist=1m $args{'sshport'} $rhost exit |";
close FH;