tags 443200 pending tags 443200 patch thanks On Sat, Sep 22, 2007 at 03:44:37PM -0700, [EMAIL PROTECTED] wrote: > On Wed, Sep 19, 2007 at 04:31:10PM -0000, [EMAIL PROTECTED] wrote: > > cdrom and cdrom(1) are the same media > > good thing i know exactly what this bug report is about... > > so, because ltspfs mounts in /tmp/.ltspfs-username/* and then bind > mounts into /media/username/*, gnome-vfs sees this as two different > devices.
tried another less intrusive approach to fixing the problem, using "mount --move" instead of "mount --bind". patch attached based on upstream bzr: http://bazaar.launchpad.net/~ltsp-upstream/ltspfs/ltspfs-trunk/ also available in bzr branch: http://llama.freegeek.org/~vagrant/bzr/ltspfs/bugs/ltspfs-debian-bts-443200 live well, vagrant
=== modified file 'scripts/ltspfsmounter' --- scripts/ltspfsmounter 2007-12-14 00:39:37 +0000 +++ scripts/ltspfsmounter 2008-01-07 23:15:01 +0000 @@ -25,11 +25,14 @@ print >>sys.stderr, "mount failed:", e try: call(lbmount_command) + if os.access(hidden_mount, 0): + os.rmdir(hidden_mount) + if os.access(root, 0): + os.rmdir(root) except OSError, e: print >>sys.stderr, "suid mount failed:", e def remove_ltspfsmount(root, dev): - hidden_mount = "%s/%s" % (root, dev) lbumount_command=['lbmount', '--umount', dev] ltspfs_umount=['fusermount', '-uzq', root+'/'+dev] @@ -42,9 +45,6 @@ except OSError, e: print >>sys.stderr, "umount failed:", e - if os.access(hidden_mount, 0): - os.rmdir(hidden_mount) - def cleanup(user): known_mounts = open( '/proc/mounts', 'r' ).readlines() for dir in ['/media', '/tmp']: @@ -72,13 +72,14 @@ path = sys.argv[1] command = sys.argv[2] root = "/tmp/.%s-ltspfs" % get_var('USER') + mediaroot = "/media/%s" % get_var('USER') conn = get_var('SSH_CONNECTION').split()[0] dev = path.split('/')[-1] if command=='add': add_ltspfsmount(conn, path, root, dev) elif command=='remove': - remove_ltspfsmount(root, dev) + remove_ltspfsmount(mediaroot, dev) elif command=='cleanup': cleanup(get_var('USER')) else: === modified file 'src/lbmount.c' --- src/lbmount.c 2007-08-21 20:01:32 +0000 +++ src/lbmount.c 2008-01-07 23:15:01 +0000 @@ -138,7 +138,7 @@ } /* Statically build command line to prevent monkey business */ if (path2) - execle(mountprog, mountprog, "--bind", path1, path2, NULL, + execle(mountprog, mountprog, "--move", path1, path2, NULL, null_env); else execle(umountprog, umountprog, path1, NULL, null_env); @@ -247,10 +247,10 @@ snprintf(ltspfsmount, sizeof(ltspfsmount), "%s%s%s%s", ltspfsdir1, pwent->pw_name, ltspfsdir2, mountpoint); - if (!is_mounted(ltspfsmount)) - exit(1); - if (!umount) { + if (!is_mounted(ltspfsmount)) + exit(1); + /* OK, name's a normal size, and looks valid. Begin creating the media * mount point. First, we need to create /media/uid */