[Pkg-utopia-maintainers] enable ntfs read/write by default

Michael Biebl biebl at debian.org
Thu May 1 15:33:12 UTC 2008


Michael Biebl wrote:
> Fathi Boudra wrote:
>>> Could you please attach this file.
>> done.
>>
>>> I'm not so sure yet. Imho the desktop should set the policy and not hal.
>>>
>>> E.g. under GNOME resp. with gnome-mount mounting ntfs partitions rw with
>>> ntfs-3g seem to work fine. So I'm wondering if it's not just a problem
>>> of KDE, not passing the correct mount flags to hal.
>> Maybe, I didn't digged into KDE as the file fixed the issue.
>>
> 

I looked a bit into it.

It seems as if KDE3/KDE4 are passing the uid= option to hal (and 
gnome-mount doesn't) when mounting ntfs volumes. hal doesn't seem to 
like that (although the policy file 20-storage-methods.fdi allows the 
uid option for ntfs). I'll keep digging.

That's the relevant code in tools/hal-storage-mount.c

> pol_change_uid = FALSE;
> /* don't consider uid= on non-pollable drives for the purpose of policy 
>   * (since these drives normally use vfat)
>   */
> if (volume != NULL) {
> 	/* don't consider uid= on vfat, iso9660, hfs and udf change-uid for the purpose of policy
> 	  * (since these doesn't contain uid/gid bits) 
> 	  */
> 	if (strcmp (libhal_volume_get_fstype (volume), "vfat") != 0 &&
> 	    strcmp (libhal_volume_get_fstype (volume), "iso9660") != 0 &&
> 	    strcmp (libhal_volume_get_fstype (volume), "hfs") != 0 &&
> 	    strcmp (libhal_volume_get_fstype (volume), "udf") != 0) {
> 		pol_change_uid = wants_to_change_uid;
> 	}
> }

...

> if (pol_is_fixed) {
> 	if (pol_change_uid) {
> 		action = NULL; /* "hal-storage-mount-fixed-extra-options"; TODO: rethink */
> 	} else {
> 		action = "org.freedesktop.hal.storage.mount-fixed";
> 	}
> } else {
> 	if (pol_change_uid) {
> 		action = NULL; /* "hal-storage-mount-removable-extra-options"; TODO: rethink "extra-options" */
> 	} else {
> 		action = "org.freedesktop.hal.storage.mount-removable";
> 	}
> }
> if (action == NULL) {
> 	unknown_error ("TODO: have to rethink extra options");
> }



Installing the policy file you attached didn't make a difference for me, 
btw.

Cheers,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



More information about the Pkg-utopia-maintainers mailing list