delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/16/09:21:50

X-Spam-Check-By: sourceware.org
Message-ID: <4533875B.2020807@byu.net>
Date: Mon, 16 Oct 2006 07:21:31 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Permission to read anything from ls, cp, and find?
References: <20061012202458 DOT GA24871 AT panix DOT com> <20061016131417 DOT GV8323 AT calimero DOT vinschen DOT de>
In-Reply-To: <20061016131417.GV8323@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----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 AT byu DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019