Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Corinna Vinschen
On Feb 21 12:55, Corinna Vinschen wrote: > > > Please, don't http://cygwin.com/acronyms/#TOFU > > > On Feb 21 11:34, Nick Lowe wrote: > > I really should subscribe to get individual messages and not just the > > digest so that I can reply properly. Sorry! > > > > > Just call NtOpenDirectoryObj

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Corinna Vinschen
Please, don't http://cygwin.com/acronyms/#TOFU On Feb 21 11:34, Nick Lowe wrote: > I really should subscribe to get individual messages and not just the > digest so that I can reply properly. Sorry! > > > Just call NtOpenDirectoryObject on \\SYSTEMROOT, rather than > > NtOpenSymbolicLinkObjec

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Nick Lowe
I really should subscribe to get individual messages and not just the digest so that I can reply properly. Sorry! > Just call NtOpenDirectoryObject on \\SYSTEMROOT, rather than > NtOpenSymbolicLinkObject. I would have thought that NtOpenSymbolicLinkObject would have been the more correct approac

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Corinna Vinschen
On Feb 21 10:26, Nick Lowe wrote: > I have just tested this and it works. It is faster, simpler and has > less overheads than querying the registry for a potentially stale > value. > > Just call NtOpenSymbolicLinkObject for \SYSTEMROOT with a > DesiredAccess of 0 and no attributes flags in the OBJ

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Nick Lowe
I have just tested this and it works. It is faster, simpler and has less overheads than querying the registry for a potentially stale value. Just call NtOpenSymbolicLinkObject for \SYSTEMROOT with a DesiredAccess of 0 and no attributes flags in the OBJECT_ATTRIBUTES structure. This will fail with

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Nick Lowe
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 value: "If this setting is enabled, case insensitivity is enforced for all directory objec

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Corinna Vinschen
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

Re: shared_info::init_obcaseinsensitive implemented incorrectly

2012-02-21 Thread Nick Lowe
Grr, I hit send before finishing writing this. I meant to write: "Then, check for existence of the uppercase or lowercase form of the path (choose appropriate casing based on the existing casing) with NtQueryAttributesFile ensuring, obviously, that the OBJ_CASE_INSENSITIVE flag is not set." Cheer