tags 270919 + patch
thanks
These are the differences between the current version of mountvirtfs
included in version 2.86.ds1-1.1, and the version provided from Luke
Kenneth Casson Leighton in this patch.
As far as I can see the 'grep -E' to 'egrep' change is just a matter
of taste, the change of the mtab handling the part relevant for this
bug, and the change for /dev/pts/ seem harmless but should also be
unrelated to this bug.
--- mountvirtfs 2005-08-31 22:48:27.000000000 +0200
+++ mountvirtfs.new 2005-09-03 18:24:05.748811030 +0200
@@ -10,8 +10,10 @@
#
# This functionality was previously provided by
# mountkernfs from the glibc package.
+
+# lkcl: 2004sep09 -
#
-# Version: @(#)mountvirtfs 2.85-23 29-Jul-2004 miquels
+# Version: @(#)mountvirtfs 2.85-21 18-Jun-2004 miquels
#
# Script needs to be robust and continue when parts fail,
@@ -64,10 +66,10 @@
TYPE=procfs
;;
esac
- elif grep -E -qs "$1\$" /proc/filesystems
+ elif egrep -qs "$1\$" /proc/filesystems
then
TYPE=$1
- elif grep -E -qs "$2\$" /proc/filesystems
+ elif egrep -qs "$2\$" /proc/filesystems
then
TYPE=$2
fi
@@ -115,17 +117,17 @@
else
# Need to update mtab only ?
if [ -n "$DO_MTAB" ] &&
- ! grep -E -sq "^([^ ]+) +$3 +" /etc/mtab
+ ! egrep -sq "^([^ ]+) +$3 +" /etc/mtab
then
mount -f -t $TYPE $OPTS $4 $TYPE $3
fi
fi
}
+
#
-# We only create/modify /etc/mtab if the location where it is
-# stored is writable. If /etc/mtab is a symlink into /proc/
-# then it is not writable.
+# If /etc/mtab is a symlink into /proc/
+# then we assume it is not writable.
#
DO_MTAB=
MOUNT_N=-n
@@ -134,17 +136,17 @@
/proc/*)
;;
/*)
- if dir_writable ${MTAB_PATH%/*}
- then
DO_MTAB=Yes
MOUNT_N=
- fi
;;
esac
+# really important on selinux to restore file context of /etc/mtab
+# otherwise mount and other programs will fail.
if [ -n "$DO_MTAB" ] && [ ! -f /etc/mtab ]
then
:> /etc/mtab
+ if [ -x /sbin/restorecon ]; then /sbin/restorecon /etc/mtab; fi
fi
# Mount standard /proc and /sys.
@@ -178,7 +180,8 @@
then
mknod --mode=666 /dev/ptmx c 5 2
fi
- domount devpts "" /dev/pts -ogid=$TTYGRP,mode=$TTYMODE
+ umount -l -f devpts
+ domount devpts "" /dev/pts
-ofscontext=system_u:object_r:devpts_t,gid=$TTYGRP,mode=$TTYMODE
fi
fi
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]