Fwd: Re: [PATCH] v5 mktemp: make -u option work more like coreutils
Denys Vlasenko
vda.linux at googlemail.com
Mon Oct 8 12:40:29 UTC 2012
On Mon, Oct 8, 2012 at 1:50 PM, Tito <farmatito at tiscali.it> wrote:
>> > + /* Don't allow directory separator in template */
>> > + if ((opts & OPT_t) && bb_basename(chp) != chp) {
>> > + errno = EINVAL;
>> > + goto error;
>> > }
>>
>> Why? Can't we just allow this to work?
>
> man page says:
>
> -t interpret TEMPLATE as a __single file name___ component, relative to a directory: $TMPDIR,
> if set; else the directory specified via -p; else /tmp [deprecated]
>
> and on debian:
>
> mktemp -t tmp/tmp.XXXXXXX
> mktemp: invalid template, `tmp/tmp.XXXXXXX', contains directory separator
I don't see the point in increasing binary's size
in order to _restrict_ what the tool can do.
--
vda
More information about the busybox
mailing list