[dm-crypt] why does cryptsetup create two mapper entries when name has a bash special character?

.. ink .. mhogomchungu at gmail.com
Tue Nov 29 17:44:59 CET 2011

tested with cryptsetup version 1.4.1

When creating a cryptsetup mapper, cryptsetup will create two mappers if
the mapper name has characters in it that appear to be bash special
characters. Are the characters bash special characters or cryptseup has its
own set of characters that trigger this behavior?

1. Create a cryptsetup mapper with the following line: cryptsetup luksOpen
abc 'ab*c\d'

/dev/mapper will now have two lines instead of regular one. The first one
will be: "/dev/mapper/ab*c\d" and the second one will be

The existence of these two entries trips the program i am writing and i am
wondering why such behavior exists. Why does cryptsetup create two entries
and not just one?

I also noticed that these special characters are substituted by an
underscore character. The space character on the other hand just cuts off
the mapper name. This is an inconsistency and could be a bug.

With the above example, if the mapper name is 'ab c\d'. The second mapper
will be "/dev/mapper/ab" and not "dev/mapper/ab_c_d"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20111129/fc96f5a8/attachment.html>

More information about the dm-crypt mailing list