Hello, I think I am seeing the same bug, on one machine (a xen domU running 2.6.18-6-xen-amd64 and Debian unstable userland FWIW):
j...@wren:~>bts show cdebconf
bts: writing to temporary file: No such file or directory
zsh: exit 2 bts show cdebconf
Strace:
open("/tmp/btsWbCZyG.html", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE|O_NOFOLLOW, 0600)
= 4
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xfff0c8c8) = -1 ENOTTY (Inappropriate
ioctl for device)
_llseek(4, 0, [0], SEEK_CUR) = 0
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
chmod("/tmp/btsWbCZyG.html", 0600) = 0
stat64("/tmp/btsWbCZyG.html", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
open("/dev/fd/4", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 ENOENT (No
such file or directory)
write(2, "bts: writing to temporary file: "..., 58bts: writing to temporary
file: No such file or directory
) = 58
This kernel is too old to have a /dev/fd. But, your use of /dev/fd is
completly unnecessary anyway. You already have an open $fh, so just
point OUT_MBOX at it:
-open (OUT_MBOX, ">/dev/fd/" . fileno($fh))
+open(OUT_MBOX, ">&", $fh);
Works for me. Note that bts contains the idiom in two places.
(BTW, there is no added security in doing this vs just writing to $filename,
unless /tmp has somehow lost its +t bit, AFAICS.)
devscripts is littered with other uses of /dev/fd, some
of which would be harder to fix.
--
see shy jo
signature.asc
Description: Digital signature
