libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small fix of libtool.m4


From: Eric Blake
Subject: Re: small fix of libtool.m4
Date: Fri, 6 May 2016 08:48:49 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]