Mount encrypted devices II part :)

Tobias Koenig tokoe at kde.org
Sat Mar 13 10:08:08 GMT 2004


Hi,

I've finished the code now which allows mounting encrypted devices with
a click on the devices icons on the desktop.
It works nearly perfect, but there are 2 small issues which are a bit
strange.

In kdelibs/kioslaves/file/file.cc:mount() the 'system(3)' call is used
to execute the mount command. But not the return call of the system
command is checked for an error but whether something was written to
stderr. That's absolute nonsense IMHO since debugging messages are
written to stderr as well and so this is no reliable solution.

What's wrong with using the return value of system(3)?

The second problem is, that per default
  mount /dev/xxx /mnt/something
is used when a device file and a mount point is given. That always leads
to an error under Linux (also xxxBSD?) when ther user is not root.
Could we change that, so that
  mount /dev/xxx /mnt/something
is only used when uid() == 0 and
  mount /mnt/something
otherwise?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040313/b8f18afb/attachment.sig>


More information about the kde-core-devel mailing list