[Toybox] [PATCH] mktemp: fix the tests and the logic.

enh enh at google.com
Wed Dec 5 17:34:55 PST 2018


(sent. you can just run `./toybox mktemp -u
tmp.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` to see the effect.)
On Wed, Dec 5, 2018 at 5:27 PM enh <enh at google.com> wrote:
>
> which seems to have found a bug in the password code?
>
> i'll send you that patch as a follow up to this one, and you can look at why if mktemp reuses that code, long enough templates end in a string of '.'s...
>
> On Wed, Dec 5, 2018 at 4:08 PM enh <enh at google.com> wrote:
>>
>> note that you've already got "random ascii" code in password.c --- i have a half-finished patch that switches mktemp over to reusing that instead...
>>
>> On Wed, Dec 5, 2018 at 3:40 PM Rob Landley <rob at landley.net> wrote:
>>>
>>> On 12/5/18 5:03 PM, enh via Toybox wrote:
>>> > Multiple bugs:
>>> >
>>> > * We weren't outputting anything in the case where we actually create a
>>> >   file or directory (but all the tests were for the -u case).
>>> >
>>> > * There are more gnarls to the behavior if TEMPLATE contains a '/'. The
>>> >   new tests cover these.
>>>
>>> Sigh. (See attached...)
>>>
>>> Lemme try to reconcile them...
>>>
>>> Rob



More information about the Toybox mailing list