On Fri, 25 Jan 2013, Roman Mamedov <r...@romanrm.ru> wrote: > The user does not have to be root, they can be a member of the group "disk" > to manage this device. > > Also some or all of the tools accept not just a block device, but also a > regular file as their parameter. > > Wouldn't it be better to check whether or not the running user has > write access to the device or file to be operated on, before failing?
Also UID==0 doesn't necessarily mean ultimate access to the system. The case where the process is running as root but still lacks the access to perform the operations in question should also be handled. Yes, ability to read/write the device/file or whatever is being operated on should be the criteria that is used not UID etc. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html