Write Protecting CD-R/RW drives

I’m sorry my funny English.
I registered my filter driver to USB Class’s LowerFilters
to make CD-R/RW drives read-only.
And my filter driver attached to \Device\USPPDO-2.
And I could CD-R/RW drives read-only by watching
WRITE scsi command in URB.
I want to write-protect only CD-R/RW drives and not floppy
drives etc.
But I have no way to recognize my device is in the CD-R/RW
device’s device stack.
Then I thought I can recognize my attaching device’s device
type by watching USBSTOR’s device object’s DeviceType.
But my DeviceObject’s AttachedDevice’s AttachedDevice is NULL.
Please tell me how to know USBSTOR’s DeviceObject above
my DeviceObject or how to know my device is in the CD-R/RW device’s
device stack.

Dear Mr. Suzuki,

To avoid blocking floppy drives, why not writing a filter driver for the
cd-rom class?

Also, blocking WRITE scsi command will not be enough if your intention is to
ensure that the medium is not altered: format unit, blank, erase, close
track/session, write and verify, repair track and reserve track could also
be use to ‘write’ the medium. (I might have forgotten some commands.)

Finally, it would be useful for software on top of you that you also filter
device-capabilities recognition (mode page 2Ah, currency of write-related
features, …) or medium-recognition commands (profile, read disc info, …)
so they don’t have the impression of write capabilities leading them to send
write commands that you would fail.

Best regards,

David Burg


David Burg
Software Development,
InCD Project Leader

Ahead Software AG phone: +49 (0)7248 911 862 (direct line)
Im Stoeckmaedle 18 fax: +49 (0)7248 911 888
76307 Karlsbad email: xxxxx@nero.com
Germany http://www.nero.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Y.Suzuki
Sent: Saturday, July 03, 2004 5:11 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Write Protecting CD-R/RW drives

I’m sorry my funny English.
I registered my filter driver to USB Class’s LowerFilters
to make CD-R/RW drives read-only.
And my filter driver attached to \Device\USPPDO-2.
And I could CD-R/RW drives read-only by watching
WRITE scsi command in URB.
I want to write-protect only CD-R/RW drives and not floppy
drives etc.
But I have no way to recognize my device is in the CD-R/RW
device’s device stack.
Then I thought I can recognize my attaching device’s device
type by watching USBSTOR’s device object’s DeviceType.
But my DeviceObject’s AttachedDevice’s AttachedDevice is NULL.
Please tell me how to know USBSTOR’s DeviceObject above
my DeviceObject or how to know my device is in the CD-R/RW device’s
device stack.


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

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

Writing a filter driver simply does not work for at least SOME of the
burning applications.
At least ALCOHOL 120% has filter driver based on hook ideology sitting
above storage driver
(atapi.sys or whatever). And user mode app is issuing commands directly
to filter thru unpublished
IOCTL interface. I guess CloneCD (elbycdio.sys) is something close to
what I said. And a lot of
applications are using these drivers for own CD/DVD write I/O (DVD
Decrypter, all Engelmann
Media tools).

Regards,
Anton A. Kolomyeytsev

RocketDivision.Com – Toolkits for Network and Storage Kernel Software
Developers

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Burg
Sent: Saturday, July 03, 2004 10:01 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Write Protecting CD-R/RW drives

Dear Mr. Suzuki,

To avoid blocking floppy drives, why not writing a filter driver for the
cd-rom class?

Also, blocking WRITE scsi command will not be enough if your intention
is to ensure that the medium is not altered: format unit, blank, erase,
close track/session, write and verify, repair track and reserve track
could also be use to ‘write’ the medium. (I might have forgotten some
commands.)

Finally, it would be useful for software on top of you that you also
filter device-capabilities recognition (mode page 2Ah, currency of
write-related features, …) or medium-recognition commands (profile,
read disc info, …) so they don’t have the impression of write
capabilities leading them to send write commands that you would fail.

Best regards,

David Burg


David Burg
Software Development,
InCD Project Leader

Ahead Software AG phone: +49 (0)7248 911 862 (direct line)
Im Stoeckmaedle 18 fax: +49 (0)7248 911 888
76307 Karlsbad email: xxxxx@nero.com
Germany http://www.nero.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Y.Suzuki
Sent: Saturday, July 03, 2004 5:11 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Write Protecting CD-R/RW drives

I’m sorry my funny English.
I registered my filter driver to USB Class’s LowerFilters
to make CD-R/RW drives read-only.
And my filter driver attached to \Device\USPPDO-2.
And I could CD-R/RW drives read-only by watching
WRITE scsi command in URB.
I want to write-protect only CD-R/RW drives and not floppy drives etc.
But I have no way to recognize my device is in the CD-R/RW device’s
device stack. Then I thought I can recognize my attaching device’s
device type by watching USBSTOR’s device object’s DeviceType. But my
DeviceObject’s AttachedDevice’s AttachedDevice is NULL. Please tell me
how to know USBSTOR’s DeviceObject above my DeviceObject or how to know
my device is in the CD-R/RW device’s device stack.


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

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


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

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

Thank you for replying.

I think it is good enough to write-protect only USB CD-R/RW,

I tried CD-ROM Class filter driver, but I could not  
write-protect as Anton said.  
And I tried USB Class filter driver, and I could attach  
to USBHUB's DeviceObject.  
I thought I can recognize my filter is in the CD-R/RW device  
stack by USBSTOR's DeviceObject's DeviceType.  
But I can't get its DeviceType because USBSTOR's  
DeviceObject's (just above my filter) AttachedDevice is NULL  
 
[DEVICE STACK]  
 
(1)CDROM DeviceObject  
|  
(2)USBSTOR DeviceObject  
(DeviceType = FILE_DEVICE_CD_ROM)  
(AttachedDevice = (1))  
|  
(3)USBSTOR DeviceObject  
(DeviceType = FILE_DEVICE_BUS_EXTENDER)  
(AttachedDevice = NULL)  
|  
(4)My Filter DeviceObject  
(AttachedDevice = (3))  
|  
(5)USBHUB DeviceObject  
(AttachedDevice = (4))  
 
Please tell me how to know (2)USBSTOR  
DeviceObject pointer. (like OSR DeviceTree utility)  
 
> Writing a filter driver simply does not work for at least SOME of the  
> burning applications.  
> At least ALCOHOL 120% has filter driver based on hook ideology sitting  
> above storage driver  
> (atapi.sys or whatever). And user mode app is issuing commands directly  
> to filter thru unpublished   
> IOCTL interface. I guess CloneCD (elbycdio.sys) is something close to  
> what I said. And a lot of  
> applications are using these drivers for own CD/DVD write I/O (DVD  
> Decrypter, all Engelmann   
> Media tools).  
>   
> Regards,  
> Anton A. Kolomyeytsev  
>   
> RocketDivision.Com -- Toolkits for Network and Storage Kernel Software  
> Developers  
>   
>   
> -----Original Message-----  
> From: xxxxx@lists.osr.com  
> [mailto:xxxxx@lists.osr.com] On Behalf Of David Burg  
> Sent: Saturday, July 03, 2004 10:01 PM  
> To: Windows File Systems Devs Interest List  
> Subject: RE: [ntfsd] Write Protecting CD-R/RW drives  
>   
>   
> Dear Mr. Suzuki,  
>   
> To avoid blocking floppy drives, why not writing a filter driver for the  
> cd-rom class?  
>   
> Also, blocking WRITE scsi command will not be enough if your intention  
> is to ensure that the medium is not altered: format unit, blank, erase,  
> close track/session, write and verify, repair track and reserve track  
> could also be use to 'write' the medium. (I might have forgotten some  
> commands.)  
>   
> Finally, it would be useful for software on top of you that you also  
> filter device-capabilities recognition (mode page 2Ah, currency of  
> write-related features, ...) or medium-recognition commands (profile,  
> read disc info, ...) so they don't have the impression of write  
> capabilities leading them to send write commands that you would fail.  
>   
> Best regards,  
>   
> David Burg  
>   
> ----------------------------------------------------------------  
> David Burg  
> Software Development,  
> InCD Project Leader  
>   
> Ahead Software AG phone: +49 (0)7248 911 862 (direct line)  
> Im Stoeckmaedle 18 fax: +49 (0)7248 911 888  
> 76307 Karlsbad email: xxxxx@nero.com  
> Germany http://www.nero.com  
> ----------------------------------------------------------------  
>   
>   
>   
> -----Original Message-----  
> From: xxxxx@lists.osr.com  
> [mailto:xxxxx@lists.osr.com] On Behalf Of Y.Suzuki  
> Sent: Saturday, July 03, 2004 5:11 PM  
> To: Windows File Systems Devs Interest List  
> Subject: [ntfsd] Write Protecting CD-R/RW drives  
>   
>   
> I'm sorry my funny English.  
> I registered my filter driver to USB Class's LowerFilters  
> to make CD-R/RW drives read-only.  
> And my filter driver attached to \Device\USPPDO-2.  
> And I could CD-R/RW drives read-only by watching  
> WRITE scsi command in URB.  
> I want to write-protect only CD-R/RW drives and not floppy drives etc.  
> But I have no way to recognize my device is in the CD-R/RW device's  
> device stack. Then I thought I can recognize my attaching device's  
> device type by watching USBSTOR's device object's DeviceType. But my  
> DeviceObject's AttachedDevice's AttachedDevice is NULL. Please tell me  
> how to know USBSTOR's DeviceObject above my DeviceObject or how to know  
> my device is in the CD-R/RW device's device stack.  
>   
>   
> ---  
> Questions? First check the IFS FAQ at  
> https://www.osronline.com/article.cfm?id=17  
>   
> You are currently subscribed to ntfsd as: xxxxx@nero.com  
> To unsubscribe send a blank email to xxxxx@lists.osr.com  
>   
>   
> ---  
> Questions? First check the IFS FAQ at  
> https://www.osronline.com/article.cfm?id=17  
>   
> You are currently subscribed to ntfsd as: xxxxx@cooldev.com  
> To unsubscribe send a blank email to xxxxx@lists.osr.com  
>   
>   
> ---  
> Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17  
>   
> You are currently subscribed to ntfsd as: xxxxx@tech.millto.net  
> To unsubscribe send a blank email to xxxxx@lists.osr.com