]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Accept more word delimiters when updating hooks
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 21 Jun 2013 19:15:42 +0000 (14:15 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 24 Jun 2013 18:56:03 +0000 (13:56 -0500)
When updating container names in hook files during a container clone,
we substitute the new container name for the old any time the old name
shows up as a separate word.  This patch adds the four characters
'.,_-' as additional delimiters.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index b1a05b4af8735c51f4c6999094206aa96c0c0550..b6d5b2ff536ef08b26c139303cb763b8b1e20c04 100644 (file)
@@ -1524,6 +1524,10 @@ static int is_word_sep(char c)
        case '\t':
        case ' ':
        case '=':
+       case '.':
+       case ',':
+       case '_':
+       case '-':
        case '/':
                return 1;
        default: return 0;