[Pkg-ltsp-devel] Bug#432024: ltspfs: Provide non-root users access to the local hard drive on the client

Petter Reinholdtsen pere at hungry.com
Sun Jul 8 09:55:19 UTC 2007


Here is a draft patch.  The lts.conf variable name
LOCALDEV_FIXEDVISIBLE should probably be changed.

This code make sure /var/run/ltspfs_fstab isn't updated for devices
that are ignored, and remove the double update of
/var/run/.delayed-mount.

The tester of this code report that it disabled the entire local
device support in LTSP.  I'm not sure why.  Any ideas?

--- scripts/add_fstab_entry.rig 2007-07-08 11:47:38.000000000 +0200
+++ scripts/add_fstab_entry     2007-07-08 11:50:48.000000000 +0200
@@ -37,17 +37,19 @@
 MOUNTPOINT=$ROOT/$LABEL
 mkdir ${MOUNTPOINT}

-echo "/dev/$devicename ${MOUNTPOINT} ${fstype} defaults 0 0" >> /var/run/ltspfs_fstab
+if [ -x /usr/bin/getltscfg ] ; then
+    LOCALDEV_FIXEDVISIBLE="$(getltscfg LOCALDEV_FIXEDVISIBLE)"
+fi

 # mount in the client session
 if [ -S /var/run/ldm_socket ]; then
+    echo "/dev/$devicename ${MOUNTPOINT} ${fstype} defaults 0 0" >> /var/run/ltspfs_fstab
     /usr/bin/ssh -S /var/run/ldm_socket server \
                  "/usr/sbin/ltspfsmounter ${MOUNTPOINT} add"
-else
+elif [ N != "${LOCALDEV_FIXEDVISIBLE}" ]; then
+    echo "/dev/$devicename ${MOUNTPOINT} ${fstype} defaults 0 0" >> /var/run/ltspfs_fstab
     echo "${MOUNTPOINT} ${devicename} ${fstype}" >> /var/run/.delayed-mount
     if [ ! -z "${FIXEDDEVICE}" ]; then
         echo "${MOUNTPOINT} ${devicename} ${fstype}" >> /var/run/.static-device
-    else
-        echo "${MOUNTPOINT} ${devicename} ${fstype}" >> /var/run/.delayed-mount
     fi
 fi




More information about the Pkg-ltsp-devel mailing list