This is the mail archive of the
mailing list for the Cygwin project.
Re: shared_info::init_obcaseinsensitive implemented incorrectly
I have just tested this and it works. It is faster, simpler and has
less overheads than querying the registry for a potentially stale
Just call NtOpenSymbolicLinkObject for \SYSTEMROOT with a
DesiredAccess of 0 and no attributes flags in the OBJECT_ATTRIBUTES
This will fail with STATUS_ACCESS_DENIED if the system is running with
case insensitivity and STATUS_OBJECT_NAME_NOT_FOUND if running with
For correctness, on the off chance that a successful NTSTATUS value is
returned, the system is running with case insensitivity and the handle
must be closed.
On Tue, Feb 21, 2012 at 9:52 AM, Nick Lowe <firstname.lastname@example.org> wrote:
> OK, fair enough, it is an edge case... I am a stickler for correctness! :P
> Looking at previous threads though actually, I notice that the
> following is documented by Microsoft regarding the obcaseinsensitive
> "If this setting is enabled, case insensitivity is enforced for all
> directory objects, symbolic links, and IO objects, including file
> objects. Disabling this setting does not allow the Win32 subsystem to
> become case sensitive."
> You could just get away with therefore, in theory, a call to
> NtOpenSymbolicLinkObject for \SYSTEMROOT. If it fails because it
> cannot be found, you know that the system is running with case
> sensitivity, otherwise, it is case sensitive.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple