it occurred to me overnight that the passwd code allows '/'. plus, as i've said, it seems to be slightly wrong. so i've just sent a replacement for my second patch (to be applied on top of the first patch) that just does the simplest xgetrandom + convert to valid character loop.
can we at least get the first patch in, since mktemp is pretty broken right now (_except_ for -u, which was all the old tests exercised)? On Wed, Dec 5, 2018 at 5:34 PM enh <[email protected]> wrote: > > (sent. you can just run `./toybox mktemp -u > tmp.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` to see the effect.) > On Wed, Dec 5, 2018 at 5:27 PM enh <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
