Add ATA Secure Erase functionality
authorDavid Zeuthen <zeuthen@gmail.com>
Mon, 2 Jul 2012 21:41:20 +0000 (17:41 -0400)
committerDavid Zeuthen <zeuthen@gmail.com>
Mon, 2 Jul 2012 21:48:58 +0000 (17:48 -0400)
commit313fd8f3334cd081d73fd5c6fab74531704a0a8b
tree607ac7271597709689a7a588b9c1d891ab2a41cc
parentbdce780eae95237c94dbba9aa00aa13a85850cd2
Add ATA Secure Erase functionality

This is available via a new Drive.Ata.SecurityEraseUnit() method but
also via the Block.Format() method by setting the @erase parameter to
'ata-secure-erase' or 'ata-secure-erase-enhanced'. The latter is the
preferred way of using the new functionality.

Secure erase requires the calling user to be authorized for the (newly
added) org.freedesktop.udisks2.ata-secure-erase polkit action. By
default this requires administrator authentication no matter what kind
of drive is being used.

Since a secure erase cannot be canceled, a new Job:Cancelable property
has been added so the UI can avoid displaying a cancel button.

Considerable care have been taken in the implementation so things are
properly logged to the system log in case something goes wrong - for
example, if a device is yanked it may remain locked and needs to be
unlocked using the temporary 'xxxx' password that is used.

http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-warning.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-confirmation.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-progress.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
data/org.freedesktop.UDisks2.xml
data/org.freedesktop.udisks2.policy.in
src/udisksbasejob.c
src/udisksdaemon.c
src/udiskslinuxblock.c
src/udiskslinuxdriveata.c
src/udiskslinuxdriveata.h
src/udiskslinuxdriveobject.c
udisks/udisksclient.c