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

zoolook nbensa+lxcusers at gmail.com
Mon Jun 24 15:23:13 UTC 2013


Hello Serge,

On Fri, Jun 21, 2013 at 4:15 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> 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;

I'm sorry for the delay.

I tested with both patches applied against
lxc-0.9.0.0~staging~20130619-1813, and it works ok with my tests.


Thank you,
Norberto




More information about the lxc-devel mailing list