[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: parted is ALMOST suitable



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Nov 09, 2016 at 10:45:52AM +0000, Brian wrote:

[...]

> I hope cfdisk is an acceptable alternative to gparted, which is not on
> my system. 'fakeroot /sbin/cfdisk' gives "cfdisk: cannot open /dev/sda:
> Permission denied".

We are talking past each other, I think.

The above result is to be expected. I'm perfectly OK with that.
You'd get that wih or without fakeroot (it doesn't convey powers
to you you don't have. That feat would imply a gaping security
hole in Linux. There are some, but the most obvious have been
covered -- hopefully! long ago.

The point Stefan (and me) are trying to make is that *the application
has no business in checking user permissions*, and parted is doing
exactly that ("am I root?"). It's something to be left to the OS
(try to open the device and catch an EACCESS error; translate that
for the user. That's what cfdisk above *is* doing, and I'm fine
with that!

*If* you happen to have read/write access to a device/file [1], then
cfdisk would let you just go ahead (right behaviour), while gparted
would stop you ("nyah nyah you aren' root" -- *wrong*).

[1] Stefan and me have given examples where that would make sense.

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgjAfYACgkQBcgs9XrR2kaPIwCeNf0Fb9cP5e4efUT3KoPrnK+V
87kAn0pivYKxpFwnQb0wa7i1rrpZdtsF
=FBNW
-----END PGP SIGNATURE-----


Reply to: