This is the mail archive of the
mailing list for the Cygwin project.
Re: shared_info::init_obcaseinsensitive implemented incorrectly
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 21 Feb 2012 10:42:36 +0100
- Subject: Re: shared_info::init_obcaseinsensitive implemented incorrectly
- References: <CADSoG1so=3KxR5TS6mVNRhZGkdUku42Y=S3eWV0dtDgiZE8Tww@mail.gmail.com> <CADSoG1uVEpxOSxAm2ZtbzE9oh95TcAQYkj_YRAZxP0tL8-3uDQ@mail.gmail.com>
- Reply-to: 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 Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple