Re: Bug#20241: Timezones should depend on debian-utils
Miquel van Smoorenburg writes:
> Well I'm not one for a living but it is one of my hobbies. This thread is
> long enough as it is but I just can't resist. /bin/sh is a Posix shell,
> so why not simply use:
>
> set -C
> : > /tmp/tempfile.$$ || exit 1
> set +C
>
> set -C causes a Posix shell to open files with O_EXCL
I thought so too until Richard Braakman enlightened me: bash checks if the
file is regular file, if not, opens it without O_EXCL. Which is worse,
zapping /etc/passwd or /dev/hda? :-(
Current bash scripts that use -C are broken. If this is fixed in some
future version of bash, packages that use -C should declare a dependecy on
bash >= xx. If they trust -C in installation scripts, change that to
Pre-dependency, right?
-Topi
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: