On Sat, Jul 29, 2006 at 01:22:05PM -0400, Dave Jones wrote: > I had visions of extending verify_command() to be of the form.. > > if (devicevendor==PLEXTOR) { > safe_for_write(ENABLE_BURN_PROOF); > safe_for_write(ENABLE_FROBNICATOR); > } > etc.. Almost there.... Instead it should walk a (device-specific (*)) table, that specifies what is "safe". The table has masks to specify which bits are important and what values are expected and allowed etc etc. This table could be initialized "empty". Next a simple interface should allow root to modify the table. I expect that after doing this, the code above the suggestion could be deleted, and that the currently-hardcoded policy could move into the default table, instead of having the table start out empty. This might be a performance tradeoff (i.e. even though it reduces code size, the hardcoded version may be much quicker than walking the table every time). Now distributions/users/sysadmins can chose: A) leave as is: The ACME DVDwriter's new SuperDVDProof feature will only work as root once implemented in cdrecord. B) insert a table entry: "everything allowed". This will allow users to shoot themselves in the foot. C) Be smart about it, and provide a mechanism to detect ACME drives with the feature, select the appropriate config file and upload the corresponding table. Everybody happy? Roger. (*) /dev/hdc, not "Plextor". -- ** R.E.Wolff@xxxxxxxxxxxx ** http://www.BitWizard.nl/ ** +31-15-2600998 ** *-- BitWizard writes Linux device drivers for any device you may have! --* Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html