This is the mail archive of the
mailing list for the Cygwin project.
shared_info::init_obcaseinsensitive implemented incorrectly
- From: Nick Lowe <nick dot lowe at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 21 Feb 2012 08:59:25 +0000
- Subject: shared_info::init_obcaseinsensitive implemented incorrectly
- Authentication-results: mr.google.com; spf=pass (google.com: domain of firstname.lastname@example.org designates 10.52.27.10 as permitted sender) email@example.com; dkim=pass firstname.lastname@example.org
- References: <CADSoG1so=3KxR5TS6mVNRhZGkdUku42Y=S3eWV0dtDgiZE8Tww@mail.gmail.com>
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_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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple