[lxc-devel] [PATCH 1/2] Accept more word delimiters when updating hooks

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jun 21 19:15:42 UTC 2013


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 at ubuntu.com>
---
 src/lxc/lxccontainer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index b1a05b4..b6d5b2f 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -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;
-- 
1.8.1.2





More information about the lxc-devel mailing list