shared_info::init_obcaseinsensitive implemented incorrectly

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Feb 21 09:43:00 GMT 2012


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



More information about the Cygwin mailing list