IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but case-sensitive in
Win2K Professional. I followed the code and saw that in Win2K they set the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it fails on
Win2K, but it works on XP. Anybody run into this problem, or is there any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

On my setup I just quickly verified 2600.1106 and 3790 build(s), OBJ_CASE_INSENSITIVE is 0x40L, the others are consistent accross the built versions too !. And
any combination of OBJ_PERMANENT … OBJ_VALID_ATTRIBUTES is not giving me 0x18, so not sure why it is internally trying to set to that value :slight_smile:

-pro

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so, I
imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few nonstandard
things, maybe even ignoring the string’s upper or lower case.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Friday, July 23, 2004 4:25 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so, I
imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few nonstandard
things, maybe even ignoring the string’s upper or lower case.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Friday, July 23, 2004 4:25 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

The problem with using the correct case is that it creates a logistic
problem. Say this is the name of a file that is added to the system at
install time and that is found by looking up a registry entry, all of a
sudden the name in the registry must case-match the name in the source code.
Given that more often than not development and release engineering are two
different organizations, this kind of thing can be pretty hard to untangle !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of valerino
Sent: Saturday, July 24, 2004 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so, I
imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few nonstandard
things, maybe even ignoring the string’s upper or lower case.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Friday, July 23, 2004 4:25 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

Since IoGetDeviceObjectPointer is so simple in its implementation, why
don’t you use your own version of it (not that you never do that :)).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Monday, July 26, 2004 7:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

The problem with using the correct case is that it creates a logistic
problem. Say this is the name of a file that is added to the system at
install time and that is found by looking up a registry entry, all of a
sudden the name in the registry must case-match the name in the source
code.
Given that more often than not development and release engineering are
two
different organizations, this kind of thing can be pretty hard to
untangle !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of valerino
Sent: Saturday, July 24, 2004 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so,
I
imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few
nonstandard
things, maybe even ignoring the string’s upper or lower case.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Friday, July 23, 2004 4:25 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira,
Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but
case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it
fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the
named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the
named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, may I should do that. The thing is, I bumped into the issue, and
another senior kernel dev bet that I was wrong, so, I wanted to rub it back
on his nose. :slight_smile: Also, this only breaks on Win2K, so, we agreed on a
spelling and let’s hope it doesn’t break for lack of attention. In the
future, if things like this come back to bite me, you bet I may consider
writing my own !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Monday, July 26, 2004 10:47 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

Since IoGetDeviceObjectPointer is so simple in its implementation, why
don’t you use your own version of it (not that you never do that :)).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Monday, July 26, 2004 7:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

The problem with using the correct case is that it creates a logistic
problem. Say this is the name of a file that is added to the system at
install time and that is found by looking up a registry entry, all of a
sudden the name in the registry must case-match the name in the source
code.
Given that more often than not development and release engineering are
two
different organizations, this kind of thing can be pretty hard to
untangle !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of valerino
Sent: Saturday, July 24, 2004 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so,
I
imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few
nonstandard
things, maybe even ignoring the string’s upper or lower case.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
Sent: Friday, July 23, 2004 4:25 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

I looked at both versions of the DDI. The only difference is that on
winxp and later, OBJ_KERNEL_HANDLE is specified in the object
attributes. Otherwise, they are exactly the same.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira,
Alberto
Sent: Friday, July 23, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoGetDeviceObjectPointer

Guys,

I bumped into a funny problem today. It appears that
IoGetDeviceObjectPointer is case-insensitive in WinXP but
case-sensitive
in
Win2K Professional. I followed the code and saw that in Win2K they set
the
OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
case-sensitive
the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
have
for example an object called \Device\OsiData, if I call
IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it
fails
on
Win2K, but it works on XP. Anybody run into this problem, or is there
any
Microsoft document describing it ?

Alberto.

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the
named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the
named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

There is really no change in IoGetDeviceObjectPointer implementation. There
is a change in the default behaviour in the object manager. In 2K, the
default behaviour was case sensitive. In XP the default behaviour is case
insensitive. We made this change to avoid some security holes. There is even
a thread at OSRONLINE.COM that discusses this
http://www.osronline.com/lists_archive/ntfsd/thread4193.html. There is a
registry key that reverts this behaviour. You can find it at
http://support.microsoft.com/default.aspx?scid=kb;en-us;817921.


Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Since IoGetDeviceObjectPointer is so simple in its implementation, why
don’t you use your own version of it (not that you never do that :)).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Monday, July 26, 2004 7:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

The problem with using the correct case is that it creates a logistic
problem. Say this is the name of a file that is added to the system at
install time and that is found by looking up a registry entry, all of a
sudden the name in the registry must case-match the name in the source
code.
Given that more often than not development and release engineering are
two
different organizations, this kind of thing can be pretty hard to
untangle !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of valerino
Sent: Saturday, July 24, 2004 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

> Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so,
I
> imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few
nonstandard
> things, maybe even ignoring the string’s upper or lower case.
>
> Alberto.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
> Sent: Friday, July 23, 2004 4:25 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] IoGetDeviceObjectPointer
>
>
> I looked at both versions of the DDI. The only difference is that on
> winxp and later, OBJ_KERNEL_HANDLE is specified in the object
> attributes. Otherwise, they are exactly the same.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Moreira,
Alberto
> Sent: Friday, July 23, 2004 10:15 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] IoGetDeviceObjectPointer
>
>
> Guys,
>
> I bumped into a funny problem today. It appears that
> IoGetDeviceObjectPointer is case-insensitive in WinXP but
case-sensitive
> in
> Win2K Professional. I followed the code and saw that in Win2K they set
> the
> OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
> case-sensitive
> the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
> have
> for example an object called \Device\OsiData, if I call
> IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it
fails
> on
> Win2K, but it works on XP. Anybody run into this problem, or is there
> any
> Microsoft document describing it ?
>
>
> Alberto.
>
>
>
>
>
> The contents of this e-mail are intended for the named addressee only.
> It
> contains information that may be confidential. Unless you are the
named
> addressee or an authorized designee, you may not copy or use it, or
> disclose
> it to anyone else. If you received it in error please notify us
> immediately
> and then destroy it.
>
>

> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
xxxxx@compuware.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> The contents of this e-mail are intended for the named addressee only.
It
> contains information that may be confidential. Unless you are the
named
> addressee or an authorized designee, you may not copy or use it, or
disclose
> it to anyone else. If you received it in error please notify us
immediately
> and then destroy it.
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Given that much of the Windows file system works on a case-insensitive
basis, it may only add to the confusion to default to a case-sensitive
search. It’s even worse to have a registry entry that changes this behavior,
because it pretty much dooms you to a case-sensitive implementation, with
all the administrative headaches that follow: this is because you cannot
assume a-priori that an user will have the machine’s registry entry set this
or that way. I believe the decision made on XP is correct: default to case
insensitive, period. I would remove that registry entry.

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Nar Ganapathy[MS]
Sent: Monday, July 26, 2004 7:55 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

There is really no change in IoGetDeviceObjectPointer implementation. There
is a change in the default behaviour in the object manager. In 2K, the
default behaviour was case sensitive. In XP the default behaviour is case
insensitive. We made this change to avoid some security holes. There is even

a thread at OSRONLINE.COM that discusses this
http://www.osronline.com/lists_archive/ntfsd/thread4193.html. There is a
registry key that reverts this behaviour. You can find it at
http://support.microsoft.com/default.aspx?scid=kb;en-us;817921.


Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Since IoGetDeviceObjectPointer is so simple in its implementation, why
don’t you use your own version of it (not that you never do that :)).

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
Sent: Monday, July 26, 2004 7:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoGetDeviceObjectPointer

The problem with using the correct case is that it creates a logistic
problem. Say this is the name of a file that is added to the system at
install time and that is found by looking up a registry entry, all of a
sudden the name in the registry must case-match the name in the source
code.
Given that more often than not development and release engineering are
two
different organizations, this kind of thing can be pretty hard to
untangle !

Alberto.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of valerino
Sent: Saturday, July 24, 2004 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] IoGetDeviceObjectPointer

Funny, i ran into the same problem when trying to get DO pointer of hd
device last night. I’ve 2 test machines, but if i remember well it
happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
scratched my head and investigated a lot anyway, just used the correct
case and it worked.

regards,
Valerio

Moreira, Alberto wrote:

> Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so,
I
> imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few
nonstandard
> things, maybe even ignoring the string’s upper or lower case.
>
> Alberto.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
> Sent: Friday, July 23, 2004 4:25 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] IoGetDeviceObjectPointer
>
>
> I looked at both versions of the DDI. The only difference is that on
> winxp and later, OBJ_KERNEL_HANDLE is specified in the object
> attributes. Otherwise, they are exactly the same.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Moreira,
Alberto
> Sent: Friday, July 23, 2004 10:15 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] IoGetDeviceObjectPointer
>
>
> Guys,
>
> I bumped into a funny problem today. It appears that
> IoGetDeviceObjectPointer is case-insensitive in WinXP but
case-sensitive
> in
> Win2K Professional. I followed the code and saw that in Win2K they set
> the
> OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
> case-sensitive
> the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
> have
> for example an object called \Device\OsiData, if I call
> IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it
fails
> on
> Win2K, but it works on XP. Anybody run into this problem, or is there
> any
> Microsoft document describing it ?
>
>
> Alberto.
>
>
>
>
>
> The contents of this e-mail are intended for the named addressee only.
> It
> contains information that may be confidential. Unless you are the
named
> addressee or an authorized designee, you may not copy or use it, or
> disclose
> it to anyone else. If you received it in error please notify us
> immediately
> and then destroy it.
>
>

> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
xxxxx@compuware.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> The contents of this e-mail are intended for the named addressee only.
It
> contains information that may be confidential. Unless you are the
named
> addressee or an authorized designee, you may not copy or use it, or
disclose
> it to anyone else. If you received it in error please notify us
immediately
> and then destroy it.
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only.
It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or
disclose
it to anyone else. If you received it in error please notify us
immediately
and then destroy it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

The registry key is only available on XP. Its meant to change the default
behavior to be 2K compliant in case we have app or driver failures.


Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.

“Moreira, Alberto” wrote in message
news:xxxxx@ntdev…
> Given that much of the Windows file system works on a case-insensitive
> basis, it may only add to the confusion to default to a case-sensitive
> search. It’s even worse to have a registry entry that changes this
> behavior,
> because it pretty much dooms you to a case-sensitive implementation, with
> all the administrative headaches that follow: this is because you cannot
> assume a-priori that an user will have the machine’s registry entry set
> this
> or that way. I believe the decision made on XP is correct: default to case
> insensitive, period. I would remove that registry entry.
>
> Alberto.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Nar Ganapathy[MS]
> Sent: Monday, July 26, 2004 7:55 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] IoGetDeviceObjectPointer
>
>
> There is really no change in IoGetDeviceObjectPointer implementation.
> There
> is a change in the default behaviour in the object manager. In 2K, the
> default behaviour was case sensitive. In XP the default behaviour is case
> insensitive. We made this change to avoid some security holes. There is
> even
>
> a thread at OSRONLINE.COM that discusses this
> http://www.osronline.com/lists_archive/ntfsd/thread4193.html. There is a
> registry key that reverts this behaviour. You can find it at
> http://support.microsoft.com/default.aspx?scid=kb;en-us;817921.
>
> –
> Nar Ganapathy
> Windows Core OS group
> This posting is provided “AS IS” with no warranties, and confers no
> rights.
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev…
> Since IoGetDeviceObjectPointer is so simple in its implementation, why
> don’t you use your own version of it (not that you never do that :)).
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Moreira, Alberto
> Sent: Monday, July 26, 2004 7:27 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] IoGetDeviceObjectPointer
>
> The problem with using the correct case is that it creates a logistic
> problem. Say this is the name of a file that is added to the system at
> install time and that is found by looking up a registry entry, all of a
> sudden the name in the registry must case-match the name in the source
> code.
> Given that more often than not development and release engineering are
> two
> different organizations, this kind of thing can be pretty hard to
> untangle !
>
>
> Alberto.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of valerino
> Sent: Saturday, July 24, 2004 1:47 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] IoGetDeviceObjectPointer
>
>
> Funny, i ran into the same problem when trying to get DO pointer of hd
> device last night. I’ve 2 test machines, but if i remember well it
> happened on w2k (sp4). So Alberto, i can confirm this. I’ve not
> scratched my head and investigated a lot anyway, just used the correct
> case and it worked.
>
> regards,
> Valerio
>
> Moreira, Alberto wrote:
>
>> Yes, I saw that too. Yet the open works on WinXP and not on Win2K, so,
> I
>> imagine that OBJ_KERNEL_HANDLE tells ZwOpenFile to do a few
> nonstandard
>> things, maybe even ignoring the string’s upper or lower case.
>>
>> Alberto.
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com]On Behalf Of Doron Holan
>> Sent: Friday, July 23, 2004 4:25 PM
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] IoGetDeviceObjectPointer
>>
>>
>> I looked at both versions of the DDI. The only difference is that on
>> winxp and later, OBJ_KERNEL_HANDLE is specified in the object
>> attributes. Otherwise, they are exactly the same.
>>
>> d
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Moreira,
> Alberto
>> Sent: Friday, July 23, 2004 10:15 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] IoGetDeviceObjectPointer
>>
>>
>> Guys,
>>
>> I bumped into a funny problem today. It appears that
>> IoGetDeviceObjectPointer is case-insensitive in WinXP but
> case-sensitive
>> in
>> Win2K Professional. I followed the code and saw that in Win2K they set
>> the
>> OBJECT_ATTRIBUTES attributes field to 0x18, which makes it
>> case-sensitive
>> the call that IoGetDeviceOjbectPointer makes to ZwOpenFile. So, if I
>> have
>> for example an object called \Device\OsiData, if I call
>> IoGetDeviceObjectPointer with the string “osidata” or “Osidata” it
> fails
>> on
>> Win2K, but it works on XP. Anybody run into this problem, or is there
>> any
>> Microsoft document describing it ?
>>
>>
>> Alberto.
>>
>>
>>
>>
>>
>> The contents of this e-mail are intended for the named addressee only.
>> It
>> contains information that may be confidential. Unless you are the
> named
>> addressee or an authorized designee, you may not copy or use it, or
>> disclose
>> it to anyone else. If you received it in error please notify us
>> immediately
>> and then destroy it.
>>
>>
>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as:
> xxxxx@compuware.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>> The contents of this e-mail are intended for the named addressee only.
> It
>> contains information that may be confidential. Unless you are the
> named
>> addressee or an authorized designee, you may not copy or use it, or
> disclose
>> it to anyone else. If you received it in error please notify us
> immediately
>> and then destroy it.
>>
>>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@compuware.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> The contents of this e-mail are intended for the named addressee only.
> It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
> disclose
> it to anyone else. If you received it in error please notify us
> immediately
> and then destroy it.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@compuware.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
> disclose
> it to anyone else. If you received it in error please notify us
> immediately
> and then destroy it.
>
>