TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Device Drivers

Notices

NdisRegisterDeviceEx() and CreateFile() security settings.

Microsoft Device Drivers


Reply
 
Thread Tools Display Modes
Old 03-12-2007, 07:26 AM   #1
matt_sykes
Guest
 
Posts: n/a
NdisRegisterDeviceEx() and CreateFile() security settings.

Hi all

Ndis 6 and Vista...

I am using NdisRegisterDeviceEx() with as SDDL of "D(A;;GA;;;SY)
(A;;GA;;;BA)(A;;GRGW;;;BU)(A;;GRGW;;;WD)" and it returns
STATUS_SUCCESS. With a symboliclinks viewer I can see my device.

But, when I try to open it with CreateFile() is using GENERIC_READ |
GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL I get the error: 'The
request is not supported'.

I have tried it with a 0 SDDL too with the same result.

I am logged in as Administrator but this needs to work for users too.

The old function, NdisRegisterDevice() works on Vista with my Ndis 5.1
driver.

Doeas anyone have any ideas? I looked at the netvmini code that ships
with the 6000 DDK and dont seed any reason for my code to fail.

Thanks in advance for any suggestions on this.

  Reply With Quote
Old 03-12-2007, 07:26 AM   #2
Gianluca Varenni
Guest
 
Posts: n/a
Re: NdisRegisterDeviceEx() and CreateFile() security settings.


"matt_sykes" <zzebowa@hotmail.com> wrote in message
news:1170172611.553041.25760@a75g2000cwd.googlegro ups.com...
> Hi all
>
> Ndis 6 and Vista...
>
> I am using NdisRegisterDeviceEx() with as SDDL of "D(A;;GA;;;SY)
> (A;;GA;;;BA)(A;;GRGW;;;BU)(A;;GRGW;;;WD)" and it returns
> STATUS_SUCCESS. With a symboliclinks viewer I can see my device.
>
> But, when I try to open it with CreateFile() is using GENERIC_READ |
> GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL I get the error: 'The
> request is not supported'.
>
> I have tried it with a 0 SDDL too with the same result.
>
> I am logged in as Administrator but this needs to work for users too.
>


Does it work if you are logged it as an administrator?
Actually if were a SDDL issue, I would expect an ACCESS_DENIED error, not a
"the request is not supported".

Have you checked the permissions on the created device and on the symbolic
link (e.g. with winobj)?

I would also check if your dispatchCreate is called and your are returning
that "the request is not supported" error.

Hope it helps
GV


> The old function, NdisRegisterDevice() works on Vista with my Ndis 5.1
> driver.
>
> Doeas anyone have any ideas? I looked at the netvmini code that ships
> with the 6000 DDK and dont seed any reason for my code to fail.
>
> Thanks in advance for any suggestions on this.
>



  Reply With Quote
Old 03-12-2007, 07:26 AM   #3
matt_sykes
Guest
 
Posts: n/a
Re: NdisRegisterDeviceEx() and CreateFile() security settings.

Yes, I am logged on as Administrator, I have enabled the Administrator
account and my dispatch function is getting hit.

I checked with winobj (I've gotta say, Marck's tools are great), good
idea of yours, the security is set to:

System, Administrators and Everyone: Delete and Query State are
checked in the Allow column, everything else is unchecked.

Restricted, Query State is checked in the Allow collumn, everything
else is unchecked.

This is with the SDDL set to "D(A;;GA;;;SY)(A;;GA;;;BA)(A;;GRGW;;;BU)
(A;;GRGW;;;WD)"

I'll have a play with the SDDL see if I can get any sense out of it.

Thanks again,


On 30 Jan, 17:46, "Gianluca Varenni" <gianluca.vare...@cacetech.com>
wrote:
> "matt_sykes" <zzeb...@hotmail.com> wrote in messagenews:1170172611.553041.25760@a75g2000cwd.go oglegroups.com...
>
>
>
>
>
> > Hi all

>
> > Ndis 6 and Vista...

>
> > I am using NdisRegisterDeviceEx() with as SDDL of "D(A;;GA;;;SY)
> > (A;;GA;;;BA)(A;;GRGW;;;BU)(A;;GRGW;;;WD)" and it returns
> > STATUS_SUCCESS. With a symboliclinks viewer I can see my device.

>
> > But, when I try to open it with CreateFile() is using GENERIC_READ |
> > GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL I get the error: 'The
> > request is not supported'.

>
> > I have tried it with a 0 SDDL too with the same result.

>
> > I am logged in as Administrator but this needs to work for users too.Does it work if you are logged it as an administrator?

> Actually if were a SDDL issue, I would expect an ACCESS_DENIED error, not a
> "the request is not supported".
>
> Have you checked the permissions on the created device and on the symbolic
> link (e.g. with winobj)?
>
> I would also check if your dispatchCreate is called and your are returning
> that "the request is not supported" error.
>
> Hope it helps
> GV
>
>
>
> > The old function, NdisRegisterDevice() works on Vista with my Ndis 5.1
> > driver.

>
> > Doeas anyone have any ideas? I looked at the netvmini code that ships
> > with the 6000 DDK and dont seed any reason for my code to fail.

>
> > Thanks in advance for any suggestions on this.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -


  Reply With Quote
Old 03-12-2007, 07:27 AM   #4
Gianluca Varenni
Guest
 
Posts: n/a
Re: NdisRegisterDeviceEx() and CreateFile() security settings.


"matt_sykes" <zzebowa@hotmail.com> wrote in message
news:1170177262.051781.139400@p10g2000cwp.googlegr oups.com...
> Yes, I am logged on as Administrator, I have enabled the Administrator
> account and my dispatch function is getting hit.


There is something weird here, then. If you dispatch routine is getting
called, the "request is not supported" error comes from your dispatch create
routine. Are you returning STATUS_SUCCESS from your dispatchCreate routine?

GV

>
> I checked with winobj (I've gotta say, Marck's tools are great), good


> DS> And instead of talking to me you should be
> DS>talking to the customer to understand what is going on.


> idea of yours, the security is set to:
>
> System, Administrators and Everyone: Delete and Query State are
> checked in the Allow column, everything else is unchecked.
>
> Restricted, Query State is checked in the Allow collumn, everything
> else is unchecked.
>
> This is with the SDDL set to "D(A;;GA;;;SY)(A;;GA;;;BA)(A;;GRGW;;;BU)
> (A;;GRGW;;;WD)"
>
> I'll have a play with the SDDL see if I can get any sense out of it.
>
> Thanks again,
>
>
> On 30 Jan, 17:46, "Gianluca Varenni" <gianluca.vare...@cacetech.com>
> wrote:
>> "matt_sykes" <zzeb...@hotmail.com> wrote in
>> messagenews:1170172611.553041.25760@a75g2000cwd.go oglegroups.com...
>>
>>
>>
>>
>>
>> > Hi all

>>
>> > Ndis 6 and Vista...

>>
>> > I am using NdisRegisterDeviceEx() with as SDDL of "D(A;;GA;;;SY)
>> > (A;;GA;;;BA)(A;;GRGW;;;BU)(A;;GRGW;;;WD)" and it returns
>> > STATUS_SUCCESS. With a symboliclinks viewer I can see my device.

>>
>> > But, when I try to open it with CreateFile() is using GENERIC_READ |
>> > GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL I get the error: 'The
>> > request is not supported'.

>>
>> > I have tried it with a 0 SDDL too with the same result.

>>
>> > I am logged in as Administrator but this needs to work for users
>> > too.Does it work if you are logged it as an administrator?

>> Actually if were a SDDL issue, I would expect an ACCESS_DENIED error, not
>> a
>> "the request is not supported".
>>
>> Have you checked the permissions on the created device and on the
>> symbolic
>> link (e.g. with winobj)?
>>
>> I would also check if your dispatchCreate is called and your are
>> returning
>> that "the request is not supported" error.
>>
>> Hope it helps
>> GV
>>
>>
>>
>> > The old function, NdisRegisterDevice() works on Vista with my Ndis 5.1
>> > driver.

>>
>> > Doeas anyone have any ideas? I looked at the netvmini code that ships
>> > with the 6000 DDK and dont seed any reason for my code to fail.

>>
>> > Thanks in advance for any suggestions on this.- Hide quoted text --
>> > Show quoted text -- Hide quoted text -- Show quoted text -

>



  Reply With Quote
Old 26-11-2008, 11:26 AM   #5
Newbie
 
Join Date: Nov 2008
Age: 30
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 rajeevt09 is an unknown quantity at this point
Re: NdisRegisterDeviceEx() and CreateFile() security settings.

Hi Matt,
I am also facing same problem. I am using NdisRegisterDeviceEX with SDDL string : SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_R_RES_R . However CreateFile fails and returns STATUS_UNSUPPORTED. Any Idea how to fix this? The NDIS5 miniport in which I Use NdisMRegisterMiniport works fine.
I put debug prints and my Dispatch routine for IRP_MJ_CREATE never gets called.
Rgds
Rajeev
rajeevt09 is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 01:34 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional