bug-coreutils
[Top][All Lists]
Advanced

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

Re: patch for a race condition and a related bug in cp


From: Jim Meyering
Subject: Re: patch for a race condition and a related bug in cp
Date: Fri, 02 Feb 2007 10:09:50 +0100

Paul Eggert <address@hidden> wrote:
> Here's a patch to fix a couple of bugs in 'cp'.  In re-reviewing this
> patch I see that I could split it into two patches if you like, since
> the bugs are separably fixable.  But for now I thought I'd just get
> this out the door.
>
> 2007-02-02  Paul Eggert  <address@hidden>
>
>       * NEWS: Document fixes to cp --parents and cp --preserve=mode.
>       * src/copy.c (copy_internal): Omit the group- or other-writeable
>       permissions when creating a directory, to avoid a race condition
>       if the special mode bits aren't right just after the directory is
>       created.
>       * src/cp.c (make_dir_parents_private): Report an error with "cp
>       --parents DIR/FILE DEST" and DIR turns out to be a non-directory.
>       * tests/cp/cp-parents: Test for the non-race-condition bug fixed
>       by the above change.

Thanks a lot for doing this.
I'll take a look soon.

I'll be happy to separate it into two deltas.

What I'd really like is a test case to exercise (and prevent
reintroduction of) the race condition bug.  Even if it has to
involve use of a debugger and/or sleeping in the test harness.




reply via email to

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