Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 417943

Summary: sys-apps/util-linux-2.19.1-r1: blkid doesn't escape / in ID_FS_LABEL
Product: Gentoo Linux Reporter: Alex Efros <powerman-asdf>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alex Efros 2012-05-28 09:46:20 UTC
blkid escape most special symbols in ID_FS_LABEL, but I think it should additionally escape / symbol (for ease mkdir/ln/mount in udev rules).

home ~ # e2label /dev/sda8
A  !"#$%&'()*+,z
home ~ # blkid -o udev -p /dev/sda8 | grep LABEL=
ID_FS_LABEL=A___#$%_____+,z

home ~ # e2label /dev/sda8
A-./:;<=>?[\]^_z
home ~ # blkid -o udev -p /dev/sda8 | grep LABEL=
ID_FS_LABEL=A-./:__=_?_____z

home ~ # e2label /dev/sda8
A`{|}~z
home ~ # blkid -o udev -p /dev/sda8 | grep LABEL=
ID_FS_LABEL=A_____z
Comment 1 SpanKY gentoo-dev 2015-03-12 04:16:12 UTC
the blkid behavior specifically matches udev.  you can e-mail the systemd/udev guys if you like.

systemd/src/libudev/libudev-private.h:
  #define UDEV_ALLOWED_CHARS_INPUT        "/ $%?,"

libblkid/src/encode.c:
  #define UDEV_ALLOWED_CHARS_INPUT               "/ $%?,"