* [dm-crypt] why does cryptsetup create two mapper entries when name has a bash special character?
@ 2011-11-29 16:44 .. ink ..
2011-11-29 17:19 ` Milan Broz
0 siblings, 1 reply; 2+ messages in thread
From: .. ink .. @ 2011-11-29 16:44 UTC (permalink / raw)
To: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
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?
example,
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
"/dev/mapper/ab_c_d".
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"
[-- Attachment #2: Type: text/html, Size: 1305 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dm-crypt] why does cryptsetup create two mapper entries when name has a bash special character?
2011-11-29 16:44 [dm-crypt] why does cryptsetup create two mapper entries when name has a bash special character? .. ink ..
@ 2011-11-29 17:19 ` Milan Broz
0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2011-11-29 17:19 UTC (permalink / raw)
To: .. ink ..; +Cc: dm-crypt
On 11/29/2011 05:44 PM, .. ink .. wrote:
>
> 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?
>
> example, 1. Create a cryptsetup mapper with the following line:
> cryptsetup luksOpen abc 'ab*c\d'
Nice bug :) Seems that llibcryptsetup go through the failback
(udev cannot create such name) and create own node.
Add --debug and you will see the log.
cryptsetup itself doesn't create device nodes and doesn't explicitly
limit characted set.
Anyway, I'll check and fix that somehow, maybe it is even fixed
in lvm2 tree (where libdevmapper resides), thanks for reporting it.
> 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.
this is done by libdevmapper compare e.g.
dmsetup create 'ab*c\d' --table "0 8 zero"
For more info... (all device name issues apply to cryptsetup as well)
https://bugzilla.redhat.com/show_bug.cgi?id=736486#c18
Milan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-29 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 16:44 [dm-crypt] why does cryptsetup create two mapper entries when name has a bash special character? .. ink ..
2011-11-29 17:19 ` Milan Broz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox