ALT Linux Bugzilla
– Attachment 5656 Details for
Bug 28136
[PATCH] add EVMS specific devmapper name mangling to whitelist
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
a quick&dirty patch to allow '|' in devmapper device node names
0001-libdm-add-to-_is_whitelisted_char.patch (text/plain), 1.37 KB, created by
Michael Shigorin
on 2012-11-27 19:04:43 MSK
(
hide
)
Description:
a quick&dirty patch to allow '|' in devmapper device node names
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2012-11-27 19:04:43 MSK
Size:
1.37 KB
patch
obsolete
>From 6c36767acfbc6f72ad7ffed298200088b9bb123b Mon Sep 17 00:00:00 2001 >From: Michael Shigorin <mike@altlinux.org> >Date: Fri, 23 Nov 2012 17:21:33 +0200 >Subject: [PATCH 1/2] libdm: add "|" to _is_whitelisted_char() > >The issue is that EVMS' lvm2 plugin would yield names like >"/dev/mapper/lvm2|vg|lv" and the current libdevmapper will >turn these down; this makes migrating legacy environments >involving devmapper-aware tools in the target configuration >a somewhat harder task than it might be. > >There's a potential security consideration with any faulty >scripts which wouldn't get device names quoted as noted by >asalor on #device-mapper; this is rather mitigated by the >fact that one needs to have EVMS activated for the devices >in question, even if these are USB flash ones. Speaking of >such scripts, these are prone to misbehave upon "=" either. >--- > libdm/libdm-common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c >index afdac89..e715629 100644 >--- a/libdm/libdm-common.c >+++ b/libdm/libdm-common.c >@@ -320,7 +320,7 @@ static int _is_whitelisted_char(char c) > if ((c >= '0' && c <= '9') || > (c >= 'A' && c <= 'Z') || > (c >= 'a' && c <= 'z') || >- strchr("#+-.:=@_", c) != NULL) >+ strchr("#+-.:=@_|", c) != NULL) > return 1; > > return 0; >-- >1.7.12.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28136
: 5656