[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
+rm -rf $LINKNAME
ln -s $DEVICE $LINKNAME
ts_fstab_add $LINKNAME $TS_MOUNTPOINT "auto" "defaults,user"
ts_is_mounted $DEVICE || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE
$TS_CMD_UMOUNT $LINKNAME || ts_die "A) Cannot umount $LINKNAME" $DEVICE
-# varian B)
-ts_init_suid $TS_CMD_MOUNT
-ts_init_suid $TS_CMD_UMOUNT
+# varian B) -- disabled, the $TS_CMD_MOUNT is usually not a real program, but
+# libtool wrapper and the real mount is exec()ed with
+# LD_LIBRARY_PATH. This all is bad for suid programs...
-su $TS_TESTUSER -c "$TS_CMD_MOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT
-ts_is_mounted $DEVICE || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
-su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT \
- || ts_die "B) Cannot umount $LINKNAME" $DEVICE
+#ts_init_suid $TS_CMD_MOUNT
+#ts_init_suid $TS_CMD_UMOUNT
+#
+#su $TS_TESTUSER -c "$TS_CMD_MOUNT -v -v -v $LINKNAME" 2>&1 >> $TS_OUTPUT
+#ts_is_mounted $DEVICE
+# || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE
+#su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT \
+# || ts_die "B) Cannot umount $LINKNAME" $DEVICE
ts_device_deinit $DEVICE
ts_fstab_clean