[SCM] Git repository for devscripts branch, master, updated. v2.12.4-123-g49b0f26

James McCoy jamessan at debian.org
Fri Dec 21 03:12:25 UTC 2012


The following commit has been merged in the master branch:
commit 49b0f267e56f5af43ce9a9670155c13400bfe97d
Author: James McCoy <jamessan at debian.org>
Date:   Thu Dec 20 22:12:15 2012 -0500

    dscverify: Use a temp file instead of a file in a temp dir
    
    Signed-off-by: James McCoy <jamessan at debian.org>

diff --git a/scripts/dscverify.pl b/scripts/dscverify.pl
index 23feb9a..331ba5c 100755
--- a/scripts/dscverify.pl
+++ b/scripts/dscverify.pl
@@ -116,11 +116,13 @@ sub get_rings {
 sub check_signature($\@;\$) {
     my ($file, $rings, $outref) = @_;
 
-    my $tempdir = File::Temp->newdir();
+    my $fh = eval { File::Temp->new() }
+	or xdie "unable to open status file for gpg: $@\n";
+
     # Allow the status file descriptor to pass on to the child process
-    local $^F = 3;
-    open(my $fh, '+>', File::Spec->catfile($tempdir, 'status'))
-	    or xdie "unable to open status file for gpg: $!\n";
+    my $flags = fcntl($fh, F_GETFD, 0);
+    fcntl($fh, F_SETFD, $flags & ~FD_CLOEXEC);
+
     my $fd = fileno $fh;
     my @cmd;
     push @cmd, qw(gpg --status-fd), $fd,

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list