summaryrefslogtreecommitdiff
path: root/sysutils/hal
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2009-04-09 18:18:27 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2009-04-09 18:18:27 +0000
commitfec58b93e95f1396e9ae7c4b44e0de47262389fc (patch)
treeab16b8b6160b1b1b968efd9a74d8f29c6a245392 /sysutils/hal
parent- obey DATADIR and DOCSDIR (diff)
Add some more argument sanity checking to the fuse helper script. This
fixes a problem where mounting NTFS volumes using ntfs-3g fails due to bad options. Submitted by: Kris Moore <kris@pcbsd.com>
Notes
Notes: svn path=/head/; revision=231945
Diffstat (limited to 'sysutils/hal')
-rw-r--r--sysutils/hal/Makefile2
-rw-r--r--sysutils/hal/files/mount-fuse32
2 files changed, 29 insertions, 5 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile
index 4baa4b8fa56f..0e1b42ce3397 100644
--- a/sysutils/hal/Makefile
+++ b/sysutils/hal/Makefile
@@ -8,7 +8,7 @@
PORTNAME= hal
DISTVERSION= 0.5.11
-PORTREVISION= 22
+PORTREVISION= 23
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/
diff --git a/sysutils/hal/files/mount-fuse b/sysutils/hal/files/mount-fuse
index ae906a8140d3..a0ea8536e3a5 100644
--- a/sysutils/hal/files/mount-fuse
+++ b/sysutils/hal/files/mount-fuse
@@ -18,6 +18,8 @@ MNTSTRING=""
OPTIONS=""
FOUNDOPT="0"
FOUNDU="0"
+FOUNDG="0"
+FOUNDBADARG="0"
HWDEV=""
FOUNDDEV="0"
@@ -29,6 +31,13 @@ do
elif [ "${FOUNDU}" = "1" ]
then
OPTIONS="${OPTIONS} -o uid=${i}"
+ elif [ "${FOUNDG}" = "1" ]
+ then
+ OPTIONS="${OPTIONS} -o gid=${i}"
+ elif [ "${FOUNDBADARG}" = "1" ]
+ then
+ # We have an invalid argument flag, so ignore it and following argument
+ FOUNDBADARG="0"
else
if [ "${FOUNDDEV}" = "1" ]
@@ -63,15 +72,15 @@ do
fi
fi
- # Add the value to our mount string
- if [ "${i}" != "-o" -a "${i}" != "-u" ]
+ # Add the value to our mount string if it isn't any invalid flag
+ if [ "${i}" != "-o" -a "${i}" != "-u" -a "${i}" != "-C" -a "${i}" != "-g" -a "${i}" != "-m" -a "${i}" != "-a" -a "${i}" != "-i" -a "${i}" -a "-W" ]
then
MNTSTRING="${MNTSTRING} ${i}"
fi
fi
- # Check if we are on a -u flag now
+ # Check if we are on a -u user id flag now
if [ "${i}" = "-u" ]
then
FOUNDU="1"
@@ -79,6 +88,14 @@ do
FOUNDU="0"
fi
+ # Check if we are on a -g group id flag now
+ if [ "${i}" = "-g" ]
+ then
+ FOUNDG="1"
+ else
+ FOUNDG="0"
+ fi
+
# Check if we are on a -o option
if [ "${i}" = "-o" ]
then
@@ -86,12 +103,19 @@ do
else
FOUNDOPT="0"
fi
+
+ # Check if we are on some other invalid flag
+ if [ "${i}" = "-C" -o "${i}" = "-m" -o "${i}" = "-W" ]
+ then
+ FOUNDBADARG="1"
+ else
+ FOUNDBADARG="0"
+ fi
done
# Save our final string which our FUSE helper will use
FINALSTRING="${MNTSTRING} ${OPTIONS}"
-
# Check that fuse.ko is loaded
kldstat | grep -q fuse 2>/dev/null
if [ "$?" != "0" ]