[PATCH] Volume formatting for HAL using PolicyKit

Christopher Santero csantero at gmail.com
Sun Apr 23 19:29:12 PDT 2006


Now that David has written (the very cool) PolicyKit, it is possible
to do meaningful privilege checking to see if a user is allowed to
format a volume. The attached patch builds on the patch I submitted
three months ago. It adds two privileges, hal-storage-fixed-format and
hal-storage-removable-format, to allow formatting of volumes on fixed
disks versus removable media. The hal-system-storage-format script
checks one of these privileges based on the storage.hotpluggable
property of the drive identified by the volume's block.storage_device.

Right now the formatting support is still limited (it's basically the
same as it was three months ago). It only allows you to give a volume
a label, no advanced filesystem parameters or anything like that. Also
I'm not sure if it's possible to exploit the label parameter by
passing a custom string. I tried doing it to no avail, though someone
who is actually good at bash might be able to break it.

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-volume-format-0.4.patch
Type: text/x-patch
Size: 9245 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060423/1065a8d0/hal-volume-format-0.4.bin


More information about the hal mailing list