public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: Federico Mena Quintero <federico@gnome.org>
To: "Mark Wielaard" <mark@klomp.org>,
	"Santiago Ruano Rincón" <santiago@debian.org>
Cc: bzip2-devel@sourceware.org,
	Anibal Monsalve Salazar <anibal@debian.org>,
	Anthony Fok <foka@debian.org>
Subject: Re: Some cherry-picks (Was: [PATCH] bzip2: Fix return value when combining --test,-t and -q.)
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <9177da2cea5575fecb89ef49a3ac1abe4adecc34.camel@gnome.org> (raw)
In-Reply-To: <909f618c164a1aee716dac9f6620aa90c5260ece.camel@klomp.org>

On Mon, 2019-06-24 at 15:55 +0200, Mark Wielaard wrote:
> The only remaining difference between the trees (for the C sources)
> is the fix for O_CLOEXEC. I would like to better understand the
> (different) Debian solution for that:
> 
> https://sources.debian.org/patches/bzip2/1.0.6-9/bzip2recover-race-open-output.diff/

This fix is partially correct, and I've pushed it to the repository in
gitlab with one change:

- Use practically the same fopen_output_safely() that is used in
bzip2.c.  This has a change to *not* use IntNative, to avoid
cutting&pasting even more #ifdefs from bzip2.c.

To make the fix fully correct, it would actually print different errors
when the output file exists, versus when it cannot be opened due to an
I/O error.  But that can wait.

I think the Debian patch may be confusing because it maintains the
description "fix unsafe race condition in opening output files" from
the bug report for bzip2-0.9.5... back then it *was* for a minor race
condition in bzip2, but these days it's only to avoid overwriting files
in bzip2recover.

  Federico

  reply	other threads:[~2019-06-25 18:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 [PATCH] bzip2: Fix return value when combining --test,-t and -q Mark Wielaard
2019-01-01  0:00 ` Santiago Ruano Rincón
2019-01-01  0:00   ` Mark Wielaard
2019-01-01  0:00     ` Some cherry-picks (Was: [PATCH] bzip2: Fix return value when combining --test,-t and -q.) Mark Wielaard
2019-01-01  0:00       ` Federico Mena Quintero [this message]
2019-01-01  0:00     ` Releasing bzip2 1.0.7 and 1.1.0 ? Was: [PATCH] bzip2: Fix return value when combining --test,-t and -q Mark Wielaard
2019-01-01  0:00       ` Mark Wielaard
2019-01-01  0:00         ` Federico Mena Quintero
2019-01-01  0:00           ` Mark Wielaard
2019-01-01  0:00             ` Federico Mena Quintero
2019-01-01  0:00               ` Mark Wielaard
2019-01-01  0:00                 ` Mark Wielaard
2019-01-01  0:00                   ` Federico Mena Quintero
2019-01-01  0:00                     ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9177da2cea5575fecb89ef49a3ac1abe4adecc34.camel@gnome.org \
    --to=federico@gnome.org \
    --cc=anibal@debian.org \
    --cc=bzip2-devel@sourceware.org \
    --cc=foka@debian.org \
    --cc=mark@klomp.org \
    --cc=santiago@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).