Skip to content

Commit

Permalink
Pass TMPDIR=1 to OBS Rsync authentication
Browse files Browse the repository at this point in the history
- Mojo::tempfile will create a temporary file in the current
  working directory. Passing TMPDIR=1 forces the function to use
  the global temp folder instead.
  • Loading branch information
josegomezr committed Nov 23, 2023
1 parent 34068e3 commit 770378a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OpenQA/WebAPI/Plugin/ObsRsync.pm
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ sub _for_every_batch {
sub _bs_ssh_sign ($key, $realm, $value) {
die "SSH key file not found at $key" unless -s $key;
# This needs to be a bit portable for CI testing
my $tmp = Mojo::File::tempfile('obs-rsync-ssh-keyfile-XXXXX')->spew($value);
my $tmp = Mojo::File::tempfile('obs-rsync-ssh-keyfile-XXXXX', TMPDIR => 1)->spew($value);
my @lines = split "\n", qx/ssh-keygen -Y sign -f "$key" -q -n "$realm" < $tmp/;
shift @lines;
pop @lines;
Expand Down

0 comments on commit 770378a

Please sign in to comment.