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

Bug#500540: automounting vfat as utf8



clone 50540 -1
reassign -1 hal
severity -1 important
retitle -1 hal passes unsafe options on
owner -1 !
thanks

Hi!

Thank you to submitter for the nice analysis of the issue.

KDE uses the information from hal to decide what options  to use when 
mounting.

On a vfat drive, hal gives the following:
hal-get-property --udi '/org/freedesktop/Hal/devices/volume_uuid_64F8_AEF6' --
key volume.mount.valid_options
ro sync dirsync noatime nodiratime noexec quiet remount exec utf8 shortname= 
codepage= iocharset= umask= dmask= fmask= uid= flush

KDE can of course specialcase and don't use the utf8 option on fat filesystems, 
but I don't think it is the job for the frontend to know which options is safe 
and unsafe.

But a untested for the kde3 media manager is here:

kdebase-3.5.9.dfsg.1/kioslave/media/mediamanager$ diff -pruN 
halbackend.cpp.orig halbackend.cpp
--- halbackend.cpp.orig 2008-10-06 19:14:22.000000000 +0200
+++ halbackend.cpp      2008-10-06 19:14:47.000000000 +0200
@@ -851,7 +851,7 @@ QStringList HALBackend::mountoptions(con

     if (valids.contains("utf8"))
     {
-        value = config.readBoolEntry("utf8", true);
+        value = config.readBoolEntry("utf8", !fstype.endsWith("fat"));
         tmp = QString("utf8=%1").arg(value ? "true" : "false");
         result << tmp;
     }

I haven't had kde3 systems around for a long time, so I'm not able to test if 
the patch actually works as expected.

/Sune
-- 
I cannot link a sendmail, how does it work?

You cannot remove from the RW jumper to the miditower in order to mount the 
firewall.

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: