X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <489B16CB.5060804@cwilson.fastmail.fm> Date: Thu, 07 Aug 2008 11:37:47 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: CSIH file permission tests on non-NTFS broken (was Re: ssh-host-config script fails) References: <2B02F35EEE21064E9EF7F377F7F37D7402949615 AT ADMAIL01 DOT ICSDMN DOT local> <20080723163450 DOT GY5251 AT calimero DOT vinschen DOT de> <20080724092249 DOT GC28166 AT calimero DOT vinschen DOT de> <20080730124957 DOT GN29031 AT calimero DOT vinschen DOT de> <48914567 DOT 3010100 AT cwilson DOT fastmail DOT fm> <20080731075001 DOT GA22385 AT calimero DOT vinschen DOT de> <4897A422 DOT 4040405 AT cwilson DOT fastmail DOT fm> <20080807081405 DOT GB30629 AT calimero DOT vinschen DOT de> In-Reply-To: <20080807081405.GB30629@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Corinna Vinschen wrote: > On Aug 4 20:51, Charles Wilson wrote: >> getvolinfo program >> http://cygwin.com/ml/cygwin/2007-08/msg00040.html >> as one of the csih helper progs, and put it under /usr/lib/csih/ >> (alternatively, import getvolinfo into cygutils). >> >> In that case, I wouldn't need to check for NTFS at all -- instead, I'd >> check for "FILE_PERSISTENT_ACLS[ ]*: TRUE", right? > > Sounds like a good idea to me. OTOH, whatever you test, you might not > cover all situations. What about letting the user override the test? Well, I can set up a new variable that calling scripts could assert, in order to force behavior one way or the other. But it would be up to the calling scripts to create a command line option so that the end user could override behavior. (although I suppose the end user could set them as exported environment vars) I'm thinking something like a list of mount points that are/are-not ACL capable: csih_WIN32_VOLS_WITH_ACLS="E:;//server/share;F:" csih_WIN32_VOLS_WITHOUT_ACLS="C:;D:;//server/othershare" Then these lists would be checked first, before using getvolinfo for unspecified mounts. That is: csih_path_supports_acls() { # convert $1 to win32 # check if it starts with any of the volumes # in csih_WIN32_VOLS_WITH_ACLS (\,/-agnostic) # and return true # check if it starts with any of the volumes # in csih_WIN32_VOLS_WITHOUT_ACLS (\,/-agnostic) # and return false return getvolinfo $1 | egrep "FILE_PERSISTENT_ACLS[ ]*: TRUE" } -- Chuck -- 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/