Bug Report and patch fix

Eitan Adler lists at eitanadler.com
Tue Aug 21 02:28:12 EST 2012


On 20 August 2012 03:11, kapil jain <jainkkapil at gmail.com> wrote:
>
>
> On Mon, Aug 20, 2012 at 5:19 AM, Eitan Adler <lists at eitanadler.com> wrote:
>>
>> On 19 August 2012 12:48, kapil jain <jainkkapil at gmail.com> wrote:
>> > Hi,
>> >
>> > I reviewed my previous patch which causes scp to exit if the file does
>> > not
>> > exist rather than continuing the transfer if there are multiple input
>> > files.
>> > Here is another patch which differs from previous one in functionality
>> > that
>> > even if one file does not exist, continue with other input files and if
>> > valid, continue to upload them rather then exiting the scp program if an
>> > invalid file is found.
>>
>> just a note: this suffers from a TOCTOU bug, though it is basically
>> harmless (it reverts to the current behavior).
>>
>> --
>> Eitan Adler
>
>
> I dont think so as this is being serial execution and no process is forked
> before that.

What happens if the file is removed by a different process after scp
is started?

As I mentioned: this harms nothing, but later code shouldn't rely on
the file existing. :)


-- 
Eitan Adler


More information about the openssh-unix-dev mailing list