Last night Jacob asked me why HAL (or more correctly, a HAL callout) needs to touch /etc/fstab. I said, “Because we need to be able to mount filesystems as non-root.” He asked why we couldn’t just patch mount.
The problem with that approach is that it doesn’t clearly separate policy from the mechanism. We’d have to hardcode device nodes (which could be anything thanks to udev) or major/minor numbers (which will likely be dynamic starting in the 2.7 kernel). Ultimately it takes the control out of the hands of the administrator. Creating a file would separate the policy from the mechanism, but /etc/fstab already is the policy for mount.
The other approach is to by default allow non-root users to mount device nodes for which they have read-write permissions. For a filesystem like FAT that has no access control at the filesystem level, this no big deal. But for filesystems like ext3, the user may not have access to the whole filesystem. You obviously don’t want them to be able to somehow extract it or worse yet, totally destroy your disk by doing “cat /dev/urandom > /dev/foo”.
Using crops to clean up contaminated soil. What a cool idea.
