Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417943 - sys-apps/util-linux-2.19.1-r1: blkid doesn't escape / in ID_FS_LABEL
Summary: sys-apps/util-linux-2.19.1-r1: blkid doesn't escape / in ID_FS_LABEL
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-28 09:46 UTC by Alex Efros
Modified: 2015-03-12 04:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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               "/ $%?,"