summaryrefslogtreecommitdiffstats
path: root/lib/Sbuild/Utility.pm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Sbuild/Utility.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sbuild/Utility.pm b/lib/Sbuild/Utility.pm
index 9cdfff1..6828692 100644
--- a/lib/Sbuild/Utility.pm
+++ b/lib/Sbuild/Utility.pm
@@ -420,6 +420,10 @@ sub get_unshare_cmd($) {
my $command = <<"EOF";
require 'syscall.ph';
+# Workaround for #1070007 (Permission denied if STDOUT points to a pipe)
+use Fcntl qw(:mode);
+chmod(0666, *STDOUT) if ((stat(*STDOUT))[2] & S_IFMT) == S_IFIFO;
+
# Create a pipe for the parent process to signal the child process that it is
# done with calling unshare() so that the child can go ahead setting up
# uid_map and gid_map.