Formatting volumes in HAL

Paul Betts paul.betts at gmail.com
Sat Feb 3 15:37:05 PST 2007


Hi, a few people and I are working on a replacement in GNOME for gformat
using HAL and we want to have this be up-to-date as possible with regard
to HAL support, here's the code in SVN if you want to check it out:

svn co svn://paulbetts.org/gformat

I'd like to reignite the "how to support formatting in HAL" debate
started about a year ago. For reference, here's the original Email:

http://lists.freedesktop.org/archives/hal/2006-January/004281.html

Since HAL now has invokable methods, it's high-time that this is looked
at. I'll quote some pieces from the original thread and give my $0.02:

> I see the big problem of security and permissions to format a volume. For a 
> CD/DVD or a floppy (and maybe also a USB-Stick, but not complete sure) we 
> could allow the user to format a volume, but for a harddisk? 

I think that if a user has console access, they have the ability to
format any drive, this is in line with the Unix security philosophy and
when it comes down to it, they could always reboot into a livecd and
format all they want. Of course, this could all be configurable by
policy but keep this fact in mind. 

> Why should you be able to format a volume if you maybe not be able to delete 
> or access one, some or all files on the volume? This break all permission and 
> security concepts.

This isn't necessarily true, because a uid/gid means nothing when you
move it from machine to machine (as is the case with the main use case,
removable USB drives). A "user" only means something in the context of
some sort of list of permissions (/etc/group,passwd or some LDAP
server), outside of that it's just some bits set in an inode. 

Anyway, the moral of the story is, I'd like to get the ball rolling on
doing this the "right" way instead of the hacky way so that hopefully it
can be included in GNOME 2.20.

-- 
Paul Betts <Paul.Betts at Gmail.com>



More information about the hal mailing list