[PATCH] V2 mktemp: fix -u option if TMPDIR is set
Tito
farmatito at tiscali.it
Thu Sep 20 14:11:03 UTC 2012
On Thursday 20 September 2012 15:58:07 you wrote:
> Tito <farmatito at tiscali.it> wrote:
> >This seems to work for me as expected eventually needs more testing.
>
> It doesn't work correctly in this case:
>
> $ mktemp -t -p /var/tmp -u temp.XXXXXX
> /var/tmp/temp.Jj1aWI
> $ export TMPDIR=/tmp
> $ mktemp -t -p /var/tmp -u temp.XXXXXX
> /tmp/temp.h8I9ly
>
> Ron
>
Hi,
can you test commenting out this line?
chp = tempnam(opts & (OPT_t|OPT_p) ? path : "./", chp);
if (!chp)
return EXIT_FAILURE;
==> //if (!(opts & (OPT_t|OPT_p)))
chp = bb_get_last_path_component_strip(chp);
goto ret;
Will repost the patch if this fixes your problem.
Ciao,
Tito
More information about the busybox
mailing list