Hello
I retrieve an SID from the driver code. How can I serialize it then pass it
to the user mode application via DeviceIoControl(), so that user mode can
call ConvertSidToStringSid() ?
Any driver mode facility to transform the SID into string?
Should I write my own SID to SidString function, that takes its bytes/dwords
and convert them into a string?
–
Elias
I think SID is a contiguous data item of variable length so, err, do you in
fact need to do serialization?
“lallous” wrote in message news:xxxxx@ntdev…
> Hello
>
> 1)
> I retrieve an SID from the driver code. How can I serialize it then pass
it
> to the user mode application via DeviceIoControl(), so that user mode can
> call ConvertSidToStringSid() ?
>
> 2)
> Any driver mode facility to transform the SID into string?
>
> 3)
> Should I write my own SID to SidString function, that takes its
bytes/dwords
> and convert them into a string?
>
> –
> Elias
>
>
>
I need to transport the SID, given its length via RtlLengthSid(), to user
mode to it is converted to a string
–
Elias
“Lyndon J Clarke” wrote in message
news:xxxxx@ntdev…
>I think SID is a contiguous data item of variable length so, err, do you in
> fact need to do serialization?
>
> “lallous” wrote in message news:xxxxx@ntdev…
>> Hello
>>
>> 1)
>> I retrieve an SID from the driver code. How can I serialize it then pass
> it
>> to the user mode application via DeviceIoControl(), so that user mode can
>> call ConvertSidToStringSid() ?
>>
>> 2)
>> Any driver mode facility to transform the SID into string?
>>
>> 3)
>> Should I write my own SID to SidString function, that takes its
> bytes/dwords
>> and convert them into a string?
>>
>> –
>> Elias
>>
>>
>>
>
>
>
RtlCopyMemory(pUserBufferFromIoCtlIrp, pSid, RtlLengthSid());
should do the trick.
The SID is self describing (i.e., the length of the Sid
is calculated from data in the sid) and has no pointers.
There is no need to preform any transformation on the
SID in order to serialize it, simple write/read the data.
lallous wrote:
I need to transport the SID, given its length via RtlLengthSid(), to user
mode to it is converted to a string
–
Elias
“Lyndon J Clarke” wrote in message
> news:xxxxx@ntdev…
>
>>I think SID is a contiguous data item of variable length so, err, do you in
>>fact need to do serialization?
>>
>>“lallous” wrote in message news:xxxxx@ntdev…
>>
>>>Hello
>>>
>>>1)
>>>I retrieve an SID from the driver code. How can I serialize it then pass
>>
>>it
>>
>>>to the user mode application via DeviceIoControl(), so that user mode can
>>>call ConvertSidToStringSid() ?
>>>
>>>2)
>>>Any driver mode facility to transform the SID into string?
>>>
>>>3)
>>>Should I write my own SID to SidString function, that takes its
>>
>>bytes/dwords
>>
>>>and convert them into a string?
>>>
>>>–
>>>Elias
>>>
>>>
>>>
>>
>>
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@vandyke.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
RtlCopySid is available from the IFS ddk.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph
Galbraith
Sent: Friday, October 01, 2004 12:27 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] how can I serialize an SID?
RtlCopyMemory(pUserBufferFromIoCtlIrp, pSid, RtlLengthSid());
should do the trick.
The SID is self describing (i.e., the length of the Sid is
calculated from data in the sid) and has no pointers.
There is no need to preform any transformation on the SID in
order to serialize it, simple write/read the data.
lallous wrote:
> I need to transport the SID, given its length via
RtlLengthSid(), to
> user mode to it is converted to a string
>
> –
> Elias
>
> “Lyndon J Clarke” wrote in message
> > news:xxxxx@ntdev…
> >
> >>I think SID is a contiguous data item of variable length
> so, err, do
> >>you in fact need to do serialization?
> >>
> >>“lallous” wrote in message news:xxxxx@ntdev…
> >>
> >>>Hello
> >>>
> >>>1)
> >>>I retrieve an SID from the driver code. How can I
> serialize it then
> >>>pass
> >>
> >>it
> >>
> >>>to the user mode application via DeviceIoControl(), so
> that user mode
> >>>can call ConvertSidToStringSid() ?
> >>>
> >>>2)
> >>>Any driver mode facility to transform the SID into string?
> >>>
> >>>3)
> >>>Should I write my own SID to SidString function, that takes its
> >>
> >>bytes/dwords
> >>
> >>>and convert them into a string?
> >>>
> >>>–
> >>>Elias
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@vandyke.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@hollistech.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
Much better as it will check pUserBufferFromIoCtlIrp to make
sure it is large enough to hold the SID (which I left out
of my one line of sample code.)
Excellent tip.
Thanks,
Mark Roddy wrote:
RtlCopySid is available from the IFS ddk.
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph
>Galbraith
>Sent: Friday, October 01, 2004 12:27 PM
>To: Windows System Software Devs Interest List
>Subject: Re: [ntdev] how can I serialize an SID?
>
>RtlCopyMemory(pUserBufferFromIoCtlIrp, pSid, RtlLengthSid());
>should do the trick.
>
>The SID is self describing (i.e., the length of the Sid is
>calculated from data in the sid) and has no pointers.
>There is no need to preform any transformation on the SID in
>order to serialize it, simple write/read the data.
>
>- Joseph
>
>lallous wrote:
>
>>I need to transport the SID, given its length via
>
>RtlLengthSid(), to
>
>>user mode to it is converted to a string
>>
>>–
>>Elias
>>
>>“Lyndon J Clarke” wrote in message
>>>news:xxxxx@ntdev…
>>>
>>>
>>>>I think SID is a contiguous data item of variable length
>>
>>so, err, do
>>
>>>>you in fact need to do serialization?
>>>>
>>>>“lallous” wrote in message news:xxxxx@ntdev…
>>>>
>>>>
>>>>>Hello
>>>>>
>>>>>1)
>>>>>I retrieve an SID from the driver code. How can I
>>
>>serialize it then
>>
>>>>>pass
>>>>
>>>>it
>>>>
>>>>
>>>>>to the user mode application via DeviceIoControl(), so
>>
>>that user mode
>>
>>>>>can call ConvertSidToStringSid() ?
>>>>>
>>>>>2)
>>>>>Any driver mode facility to transform the SID into string?
>>>>>
>>>>>3)
>>>>>Should I write my own SID to SidString function, that takes its
>>>>
>>>>bytes/dwords
>>>>
>>>>
>>>>>and convert them into a string?
>>>>>
>>>>>–
>>>>>Elias
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>—
>>>Questions? First check the Kernel Driver FAQ at
>>>http://www.osronline.com/article.cfm?id=256
>>>
>>>You are currently subscribed to ntdev as: xxxxx@vandyke.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@hollistech.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@vandyke.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>