This patch is not correct. Sorry.

On 09/08/2014 12:51 PM, Jan Chaloupka wrote:
> "default" is used as a keyword for defining default group permissions. 
> However, this keyword can be used as a group name as well. As of now, parsing 
> fails if "default" is used as a group name. This patch modifies parsing rule 
> for group name.
>
> Signed-off-by: Jan Chaloupka <jchal...@redhat.com>
> ---
>   src/parse.y |   16 +++++++++++++---
>   1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/src/parse.y b/src/parse.y
> index 9adbc0e..98f7699 100644
> --- a/src/parse.y
> +++ b/src/parse.y
> @@ -45,9 +45,9 @@ int yywrap(void)
>       int val;
>       struct cgroup_dictionary *values;
>   }
> -%type <name> ID
> +%type <name> ID DEFAULT
>   %type <val> mountvalue_conf mount task_namevalue_conf admin_namevalue_conf
> -%type <val> admin_conf task_conf task_or_admin group_conf group start
> +%type <val> admin_conf task_conf task_or_admin group_conf group start 
> group_name
>   %type <val> namespace namespace_conf default default_conf
>   %type <values> namevalue_conf
>   %type <val> template template_conf
> @@ -99,7 +99,7 @@ default_conf
>       }
>       ;
>   
> -group   :       GROUP ID '{' group_conf '}'
> +group   :       GROUP group_name '{' group_conf '}'
>       {
>               $$ = $4;
>               if ($$) {
> @@ -119,6 +119,16 @@ group   :       GROUP ID '{' group_conf '}'
>       }
>           ;
>   
> +group_name
> +     :       ID
> +     {
> +             $$ = $1;
> +     }
> +     |       DEFAULT
> +     {
> +             $$ = $1;
> +     }
> +
>   group_conf
>           :       ID '{' namevalue_conf '}'
>       {
>

-- 
Jan Chaloupka
------------------------------
* Software Engineer          *
* ENG Base Operating Systems *
* Red Hat Czech, s. r. o.    *
* UTC+1 (CET), jchaloup      *


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to