delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/08/16:02:50

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: managed mount bug
Date: Fri, 8 Dec 2006 21:02:05 +0000 (UTC)
Lines: 30
Message-ID: <loom.20061208T215318-951@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

$ mount -m    
mount -f -u -b -o managed "C:/cygwin/home/eblake/managed" "/home/eblake/managed"
mount -f -s -b "C:/cygwin/bin" "/usr/bin"
mount -f -s -b "C:/cygwin/lib" "/usr/lib"
mount -f -s -b "C:/cygwin" "/"
mount -s -b --change-cygdrive-prefix "/cygdrive"
$ mkdir managed/dir
$ touch managed/dir/Oops
$ mv managed/dir .
$ ls dir
%4Fops
$ touch dir/oOPS
$ mv dir managed/.
$ ls -F managed/dir
ls: cannot access managed/dir/oOPS: No such file or directory
Oops oOPS

It seems to me that rename(2) should be taught that if the file being moved is 
a directory, and there is a difference in managed-ness between the source and 
destination, then rename(2) should fail with EXDEV, so that mv(1) will fall 
back to recursive copying.  That would avoid the problems shown above where 
escapes escaped to normal directories, as well as problems with un-statable 
files when copying from normal to managed, since filenames would be handled on 
a per-file basis (possibly failing when going from managed to normal, of 
course), rather than the current behavior of renaming the directory without 
changing its contents.

-- 
Eric Blake



--
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