Bugzilla – Attachment 73043 Details for
Bug 157626
DVD-RAM is mounted to /media/disk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
patch to substitute strange characters instead of rejecting them
hal-0.5.6-sanitze-mountpoint.diff (text/plain), 1.68 KB, created by
Ludwig Nussel
on 2006-03-15 15:32:01 UTC
(
hide
)
Description:
patch to substitute strange characters instead of rejecting them
Filename:
MIME Type:
Creator:
Ludwig Nussel
Created:
2006-03-15 15:32:01 UTC
Size:
1.68 KB
patch
obsolete
>Index: hal-0.5.6/tools/hal-system-storage-mount >=================================================================== >--- hal-0.5.6.orig/tools/hal-system-storage-mount >+++ hal-0.5.6/tools/hal-system-storage-mount >@@ -73,39 +73,25 @@ check_fstab "$HAL_PROP_BLOCK_DEVICE" || > # pass e.g. umask=0600,suid,dev or umask=`/bin/evil` > > read GIVEN_MOUNTPOINT >-GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/@} > read GIVEN_MOUNTTYPE > GIVEN_MOUNTTYPE=${GIVEN_MOUNTTYPE//[^a-zA-Z0-9_=]/_} > read GIVEN_MOUNTOPTIONS > GIVEN_MOUNTOPTIONS=${GIVEN_MOUNTOPTIONS//[^a-zA-Z0-9_=[:space:]]/_} > >-# if no mountpoint, get mountpoint from label >-if [ "$GIVEN_MOUNTPOINT" == "" ]; then >- case "$HAL_PROP_VOLUME_LABEL" in >- *[!A-Za-z0-9_\-\+:]*) >- ;; >- *) >- GIVEN_MOUNTPOINT="$HAL_PROP_VOLUME_LABEL" >- esac >-fi >- >-# if no mountpoint is given, use default name >-if [ "$GIVEN_MOUNTPOINT" == "" ]; then >- if [ "$HAL_PROP_STORAGE_MEDIA_CHECK_ENABLED" == "false" ]; then >- GIVEN_MOUNTPOINT="$HAL_PROP_STORAGE_DRIVE_TYPE" >+if [ -z "$GIVEN_MOUNTPOINT" ]; then >+ if [ -n "$HAL_PROP_VOLUME_LABEL" ]; then >+ GIVEN_MOUNTPOINT="$HAL_PROP_VOLUME_LABEL" >+ elif [ -n "$HAL_PROP_STORAGE_DRIVE_TYPE" ]; then >+ GIVEN_MOUNTPOINT="$HAL_PROP_STORAGE_DRIVE_TYPE" > else > GIVEN_MOUNTPOINT="disk" > fi > fi > >-# we've replaced invalid characters in requested mountpoint with '@' >-case "$GIVEN_MOUNTPOINT" in >- *@*) >- echo "org.freedesktop.Hal.Device.Volume.InvalidMountpoint" >&2 >- echo "The mountpoint is invalid." >&2 >- exit 1 >- ;; >-esac >+# sanitize >+GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/_} >+GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT/./_} >+ > MOUNTPOINT="$GIVEN_MOUNTPOINT" > > # pass only whitelisted types
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 157626
:
72600
| 73043