[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: small fix of libtool.m4
From: |
Christian |
Subject: |
Re: small fix of libtool.m4 |
Date: |
Sun, 8 May 2016 20:57:03 -0700 |
thx Eric for taking a look at my patch.
it seems to be a good idea to use ‘rm -f’ and i also think it looks like $RM
should already be set to ‘rm -f’. but i don’t get why it should fail than.
what i’ll do next is check if $RM really is set to ‘rm -f’ using a debug
print. couldn’t do it right now, just in case it might be set different for
some reason.
> On May 6, 2016, at 7:48 AM, Eric Blake <address@hidden> wrote:
>
> On 05/05/2016 11:22 PM, Christian wrote:
>> So i found that if you’re running ‘./configure’ on a project that depends on
>> libtool, it might happen that the script will end up with the following
>> error:
>> “/bin/rm: cannot remove 'libtoolT': No such file or directory”. I did some
>
>>
>> cfgfile=${ofile}T
>> trap "$RM \"$cfgfile\"; exit 1" 1 2 15
>> - $RM "$cfgfile"
>> + if test -e "$cfgfile" ; then
>> + $RM "$cfgfile"
>> + fi
>
> That's a TOCTTOU data race. Wouldn't it be better to just use 'rm -f'?
> In fact, isn't $RM supposed to be including -f automatically?
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
- small fix of libtool.m4, Christian, 2016/05/06
- Re: small fix of libtool.m4, Eric Blake, 2016/05/06
- Re: small fix of libtool.m4,
Christian <=
- Re: small fix of libtool.m4, Christian, 2016/05/09
- Re: small fix of libtool.m4, Roumen Petrov, 2016/05/09
- Re: small fix of libtool.m4, Christian, 2016/05/09
- Re: small fix of libtool.m4, Richard PALO, 2016/05/10
- Re: small fix of libtool.m4, Christian, 2016/05/10
- Re: small fix of libtool.m4, Christian, 2016/05/10