bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils patch for files that are writeable but not readable


From: Jim Meyering
Subject: Re: coreutils patch for files that are writeable but not readable
Date: Tue, 10 Aug 2004 10:59:10 +0200

Paul Eggert <address@hidden> wrote:
> I installed the following patch to fix some inadequacies of coreutils
> in cases where files (particularly, directories) are writeable but
> not readable.
>
> fchdir requires only execute (search) access, so it'd be nice if we
> could somehow get a search-only file descriptor for a directory (in
> particular, the current directory) even if we have only search
> permission for that directory.  However, I don't know how to do this,
> even on more-advanced systems like GNU/Hurd and solaris.
>
> 2004-08-09  Paul Eggert  <address@hidden>
>
>       * lib/chown.c (rpl_chown): Work even if the file is writeable but not
>       readable.  This could be improved further but it'd take some work.
>       * lib/fts.c (diropen): New function.
>       (fts_open, fts_read, fts_children, fts_safe_changedir):
>       Use it, so that the code works even if the directory
>       is writeable but not readable.  We'd like it to work even if
>       the directory is merely executable, but I don't know how to do
>       that portably.

Nice.  Thanks.
I suppose you've read some of the discussions of the O_NOACCESS open flag.
What we want is something like that.

Do you know of a way to do it that's *not* portable?

>       * src/shred.c (wipename): Work even if the directory is writeable
>       and not readable.  Prefer write access, since this should work
>       better with fdatasync.




reply via email to

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