File properties & access mask wierdness...

Ok, So I start looking at the access masks (in Windbg) associated with FileOpen
calls (in the kernel) and all of a sudden I am seeing masks with a “c” or
and “8” in the high order byte…but the DDk does not mention what these
are for. It would appear that a file open for write has a “c” hex mask set
for the highest byte but I can’t confirm this…there is plenty in the ddk
.h files about the lower order bytes in the access mask but nothing about
these higher ones…I thought a file open for write would have a 0x02 in
the lower byte but that doesnt appear to be the case…I know the confusion
lies within me but I need a dope slap…

Can someone toss me a bone? All I want to know is when I file is open in
write mode so I can work some semaphores… :^(

thanks
Ken “need the info” Steinberg

The upper bits of the access mask are used for the “Generic Rights”.
You don’t care, because by the time they have gone through the I/O
Manager they have been translated into the necessary standard and
specific rights that YOU do care about. Here they are (straight from
the header file):

#define GENERIC_READ (0x80000000L)
#define GENERIC_WRITE (0x40000000L)
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)

So 0xc is GENERIC_READ|GENERIC_WRITE and 0x8 is GENERIC_READ.

I hope this clarifies things for you.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: bounce-212

xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
Ken Steinberg
Sent: Thursday, June 16, 2005 9:38 PM
To: ntfsd redirect
Subject: [ntfsd] File properties & access mask wierdness…

Ok, So I start looking at the access masks (in Windbg) associated with
FileOpen
calls (in the kernel) and all of a sudden I am seeing masks with a “c”
or
and “8” in the high order byte…but the DDk does not mention what these

are for. It would appear that a file open for write has a “c” hex mask
set
for the highest byte but I can’t confirm this…there is plenty in the
ddk
.h files about the lower order bytes in the access mask but nothing
about
these higher ones…I thought a file open for write would have a 0x02
in
the lower byte but that doesnt appear to be the case…I know the
confusion
lies within me but I need a dope slap…

Can someone toss me a bone? All I want to know is when I file is open
in
write mode so I can work some semaphores… :^(

thanks
Ken “need the info” Steinberg


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Hello Tony,

Thanks a lot…that atleast cleared up an confusion…I dont like not knowing
mask values…they have a tendency to bite!

Ken

The upper bits of the access mask are used for the “Generic Rights”.
You don’t care, because by the time they have gone through the I/O
Manager they have been translated into the necessary standard and
specific rights that YOU do care about. Here they are (straight from
the header file):

#define GENERIC READ (0x80000000L) #define GENERIC
WRITE (0x40000000L) #define GENERIC EXECUTE
(0x20000000L) #define GENERIC ALL (0x10000000L)

So 0xc is GENERIC READ|GENERIC WRITE and 0x8 is GENERIC READ.

I hope this clarifies things for you.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
> From: bounce-212
>
> xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf
> Of
> Ken Steinberg
> Sent: Thursday, June 16, 2005 9:38 PM
> To: ntfsd redirect
> Subject: [ntfsd] File properties & access mask wierdness…
> Ok, So I start looking at the access masks (in Windbg) associated
> with
> FileOpen
> calls (in the kernel) and all of a sudden I am seeing masks with a
> “c”
> or
> and “8” in the high order byte…but the DDk does not mention what
> these
> are for. It would appear that a file open for write has a “c” hex
> mask
> set
> for the highest byte but I can’t confirm this…there is plenty in
> the
> ddk
> .h files about the lower order bytes in the access mask but nothing
> about
> these higher ones…I thought a file open for write would have a
> 0x02
> in
> the lower byte but that doesnt appear to be the case…I know the
> confusion
> lies within me but I need a dope slap…
> Can someone toss me a bone? All I want to know is when I file is
> open
> in
> write mode so I can work some semaphores… :^(
> thanks
> Ken “need the info” Steinberg
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> You are currently subscribed to ntfsd as: xxxxx@osr.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>