[PATCH] sanitize instead of rejecting mountpoints with funny characters

David Zeuthen david at fubar.dk
Sun Feb 26 16:19:55 PST 2006


Hi,

Thanks for your patch,

On Fri, 2006-02-24 at 15:41 +0100, Ludwig Nussel wrote:
> Hi,
> 
> Since front-ends that call the Mount method have no way to determine
> the whitelist used for filtering invalid mount points it's better to
> not completely reject "invalid" ones IMO. If the Mount call fails a
> front-end only has the possibility to call it again without a mount
> point which results in the device beeing mounted on "disk". By
> replacing invalid characters with eg. an underscore the mount point
> at least looks similar to what the user actually entered.

So, I'd rather we precisely define what mount points are acceptable and
then the front-ends can replace invalid characters with underscores
themselves.. Right now I think we allow

 [:alnum:]_=[:space:]:.,+-

in the en_US.UTF-8 locale... That might change a bit when we rewrite
this stuff in C.. What do you think?

> I think the is_ascii check in the fdi file for setting the
> desired_mount_point property should also be removed as it prevents
> mountpoints with umlauts from beeing used by default although the
> hal-system-storage-mount allows them.

[storage|volume].policy.desired_mount_point is obsolete. You should
change code that relies on it. For example, these properties are not
available in the HAL in the Fedora development tree...

Cheers,
David




More information about the hal mailing list