Paul Eggert <[EMAIL PROTECTED]> 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  <[EMAIL PROTECTED]>
>
>       * 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.


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to