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

Bug#747672: Dropping patch



control: found -1 burp/1.4.40-1

Dear Svante,

Although the burp 1.4.40 test suite passes with this patch applied,
upstream reports that the 2.0.x series test suite finds a problem.  The
patch causes this problem when applied to burp 1.4.40, even though the
older test suite passes.

Since this is an old bug, I am preparing a QA upload to drop the patch
for now.

Burp's author Graham Keeling explains:

> Here is the code in 1.4.40.
>
> // Return 0 for lock got, 1 for lock not got, -1 for error.
> int get_lock(const char *path)
> {
> ... some set up....
>         if(lockf(fdlock, F_TLOCK, 0))
>         {
>                 if(errno==EACCES || errno==EAGAIN)
>                         return 1; // Lock not got.
>                 logp("Could not get lock %s: %s\n", path, strerror(errno));
>                 return -1; // Some other error.
>         }
> ...some more code...
>         return 0;
> }
>
>
> As you can see, get_lock() has three different return codes that mean
> different things.
> If you check 'man 2 flock', you will see that flock() will never set errno
> to EACCES or EAGAIN. This means that get_lock() will never detect the
> difference between a lock existing, or some error.

Thanks to Graham for letting me reproduce this explanation.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature


Reply to: