[Top][All Lists]

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

RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF

From: Joachim Schmitz
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 16 Dec 2011 14:46:41 +0100

> From: Eric Blake [mailto:address@hidden
> Sent: Friday, December 16, 2011 2:42 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; address@hidden; address@hidden; bug-
> address@hidden
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> On 12/16/2011 06:02 AM, Joachim Schmitz wrote:
> > Hmm, I can dup() an fd for a directory if or had been open()'d
> > O_RDONLY, but not if opened O_WRONLY or O_RDWR, I'll get an EISDIR
> from open() then.
> But you shouldn't be able to open() a directory O_WRONLY or O_RDWR in the
> first place, under POSIX. 


> Is this a bug in our open() wrapper for permitting a
> bad open() on a directory, which then renders the fd un-dup()able?  Or is
> really some other O_* flag causing the issue?

It is not O_NOCTTY or O_NONBLOCK and the others (O_SEARCH, O_DIRECTORY,
O_NOFOLLOW, O_NOATIME) don't exist here.

Bye, Jojo

reply via email to

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