GNU bug report logs -
#28023
fix make-temp-file race on local host
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Wed, 9 Aug 2017 05:39:02 UTC
Severity: important
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: 28023 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Wed, 9 Aug 2017 16:36:55 -0700
>
> Eli Zaretskii wrote:
> > Perhaps you are right, and it will "just work". I will have to try
> > (for now, I just looked at the sources and the changes, but didn't try
> > building).
>
> It looks to me like it should just work.
Well, it's not that easy after all. First, nt/gnulib-cfg.mk needs to
be fixed to remove the lines that disable building tempname.c and
mkostmp.c, and nt/mingw-cfg.site needs to remove the line which claims
that mkostmp is available. Otherwise, tempname.c will not be
compiled. This is easy to fix.
Then it turns out ms-w32.h only makes its redirections when compiling
with -Demacs, which is not what happens when Gnulib sources are
compiled. I can fix this, but it will need a few changes in lib-src,
which currently doesn't expect 'open' to be redirected.
And finally, tempname.c calls mkdir with 2 arguments, whereas mkdir on
Windows accepts only one. (This means Gnulib lacks a dependency,
since the tempname module should then depend on mkdir, which isn't in
lib/.) Since we don't want the Gnulib replacement for mkdir, we will
have to change w32.c:sys_mkdir to accept 2 arguments to fix this,
unless you have a better idea.
How do you propose to proceed with this?
> You might also consider the second
> attached patch: it removes the MS-Windows implementation of mkostemp, since the
> generic code should just work as well.
Once the above problems are taken care of, the mkostemp part should be
easy.
Thanks.
This bug report was last modified 7 years and 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.