This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Permission to read anything from ls, cp, and find?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Corinna Vinschen on 10/16/2006 7:14 AM:
> 
> Please be aware that one problem remains.  The Windows function
> SetCurrentDirectory, which is the base function used by chdir(2),
> apparently tries to open the directory in which to change without using
> the FILE_OPEN_FOR_BACKUP_INTENT flag.  This has the effect that chdir
> fails when the process has no sufficient permissions on the directory
> even if it has backup privileges.  This is also very unfortunate, since,
> for instance, find(1) traverses directory trees by chdir'ing into
> directories before listing them.  So even with this patch, find(1) is
> still not a good candidate for backing up directory trees in a situation
> as you describe above.  tar(1) doesn't seem to have this problem,
> though.

Which version of find?  find 4.3.0 switched over to gnulib's fts
implementation, which, if openat() and friends were to be implemented, is
capable of traversing directories without using chdir.  Even with the
current cygwin limitation of no openat(), it can still traverse almost
everything using /proc/self/fd/blah; the only problem is that because
cygwin still incorrectly treats /proc/self/fd/.. as /proc/self/ instead of
the parent directory of the open directory fd, you can't traverse back up
the tree.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFM4db84KuGfSFAYARAmsAAKCkrGdgq0/lcSyFHG1OfFp61yFpcQCeKMiX
wNSI3Fri8UdAvLgB0Vjii5s=
=o1rn
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]