X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 21 Feb 2012 10:42:36 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: shared_info::init_obcaseinsensitive implemented incorrectly Message-ID: <20120221094236.GC22597@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Feb 21 08:59, Nick Lowe wrote: > Dear Cygwin Developers, > > shared_info::init_obcaseinsensitive in shared.cc has, in my opinion, > been implemented incorrectly. > > The value of the obcaseinsensitive value in the registry only > represents how the object manager will be on next reboot and not its > present state. Cygwin uses it as if it represents the present state, > however. This is likely to be true, but is not guaranteed to be. > > To determine the present state, first get the system root path via either: > > 1) Querying the %SystemRoot% environment variable via > RtlExpandEnvironmentStrings_U and change it with > RtlDosPathNameToNtPathName_U (alternatively > RtlDosPathNameToNtPathName_U_WithStatus in Vista and later). > > 2) Querying the symbolic link target of \SystemRoot via > NtQuerySymbolicLinkObject. (Requires administrative rights.) > > Then, check for existence of the uppercase form of the path with > NtQueryAttributesFile ensuring, obviously, that the > OBJ_CASE_INSENSITIVE flag is not set. > > If the the NTSTATUS value is successful, the object manager is running > with case insensitivity, if not its running with case sensitivity. Sorry, but that's much too complicated. This code is supposed to be fast. And the obcaseinsensitive setting in the registry is not something which is going to be changed a lot. And those who change it know that it only has an effect after reboot, so they will reboot soon. I'm perfectly fine with the fact that Cygwin will not be quite right until the next reboot in this case. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple