ltspfs_entry uses nonexistent blkid variable ID_FS_LABEL_SAFE to generate mountpoint

Bug #690969 reported by gcc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Undecided
Unassigned
ltspfs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ltspfs

If I plug in a USB disk to an LTSP terminal, it always gets a name like "usbdisk-sdb1".

It seems that this part of ltspfs_entry tries to generate a human-readable label in add_device():

  [ -z "${LABEL}" ] && LABEL=${ID_FS_LABEL_SAFE}

However this environment variable is not set by udev/blkid. Example output:

manager@zambiaserver1:~$ sudo blkid -o udev /dev/md0
ID_FS_LABEL=Old_System
ID_FS_LABEL_ENC=Old\x20System
ID_FS_UUID=dda64916-4dab-44bc-8b23-376ef99cb133
ID_FS_UUID_ENC=dda64916-4dab-44bc-8b23-376ef99cb133
ID_FS_SEC_TYPE=ext2
ID_FS_TYPE=ext3

It seems that ID_FS_LABEL is now "safe", see util-linux/misc-utils/blkid.c in print_udev_format:

        } else if (!strcmp(name, "UUID") ||
                 !strcmp(name, "LABEL") ||
                 !strcmp(name, "UUID_SUB")) {

                blkid_safe_string(value, safe, sizeof(safe));
                printf("ID_FS_%s=%s\n", name, safe);

                blkid_encode_string(value, enc, sizeof(enc));
                printf("ID_FS_%s_ENC=%s\n", name, enc);

So I think the following patch is appropriate:

manager@zambiaserver1:/opt/ltsp/i386$ diff -u lib/udev/ltspfs_entry{.old,}
--- lib/udev/ltspfs_entry.old 2010-12-16 09:15:50.795266000 +0200
+++ lib/udev/ltspfs_entry 2010-12-16 09:16:49.199266000 +0200
@@ -247,7 +247,7 @@
             ;;
     esac

- [ -z "${LABEL}" ] && LABEL=${ID_FS_LABEL_SAFE}
+ [ -z "${LABEL}" ] && LABEL="${ID_FS_LABEL}"
     [ -z "${LABEL}" ] && LABEL="${ID_BUS}${ID_TYPE}-${DEVICENAME}"

     # Check for existing label with same name

Changed in ltspfs (Ubuntu):
status: New → Triaged
Changed in ltsp:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltspfs - 0.9-0ubuntu1

---------------
ltspfs (0.9-0ubuntu1) oneiric; urgency=low

  * New upstream release (0.9)
    - ID_FS_LABEL is now usually 'safe'. Patch from gcc (LP: #690969)
    - cdpinger: add support for UDF formatted CDs and DVDs.
 -- Stephane Graber <email address hidden> Thu, 11 Aug 2011 12:09:58 -0400

Changed in ltspfs (Ubuntu):
status: Triaged → Fix Released
Changed in ltsp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.