public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Nick Lowe <nick.lowe@gmail.com>
To: cygwin@cygwin.com
Subject: shared_info::init_obcaseinsensitive implemented incorrectly
Date: Tue, 21 Feb 2012 08:59:00 -0000	[thread overview]
Message-ID: <CADSoG1uVEpxOSxAm2ZtbzE9oh95TcAQYkj_YRAZxP0tL8-3uDQ@mail.gmail.com> (raw)
In-Reply-To: <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 (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.

With regards,

Nick Lowe

--
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

       reply	other threads:[~2012-02-21  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADSoG1so=3KxR5TS6mVNRhZGkdUku42Y=S3eWV0dtDgiZE8Tww@mail.gmail.com>
2012-02-21  8:59 ` Nick Lowe [this message]
2012-02-21  9:11   ` Nick Lowe
2012-02-21  9:53     ` Nick Lowe
2012-02-21 10:26       ` Nick Lowe
2012-02-21 11:04         ` Corinna Vinschen
2012-02-21 11:34         ` Nick Lowe
2012-02-21 11:56           ` Corinna Vinschen
2012-02-21 17:12             ` Corinna Vinschen
2012-02-21  9:43   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADSoG1uVEpxOSxAm2ZtbzE9oh95TcAQYkj_YRAZxP0tL8-3uDQ@mail.gmail.com \
    --to=nick.lowe@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).