Message ID | 20221124163153.500945-1-vmojzis@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1d33c911f514 |
Headers | show |
Series | [1/2] checkpolicy: Improve error message for type bounds | expand |
On Thu, Nov 24, 2022 at 11:40 AM Vit Mojzis <vmojzis@redhat.com> wrote: > > Make the error message consistent with other occurrences of the > same issue: > https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L243 > https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L488 > > Signed-off-by: Vit Mojzis <vmojzis@redhat.com> For these two patches: Acked-by: James Carter <jwcart2@gmail.com> > --- > checkpolicy/policy_define.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c > index 41e44631..86d57017 100644 > --- a/checkpolicy/policy_define.c > +++ b/checkpolicy/policy_define.c > @@ -1416,7 +1416,7 @@ static int define_typebounds_helper(char *bounds_id, char *type_id) > if (!type->bounds) > type->bounds = bounds->s.value; > else if (type->bounds != bounds->s.value) { > - yyerror2("type %s has inconsistent master {%s,%s}", > + yyerror2("type %s has inconsistent bounds %s/%s", > type_id, > policydbp->p_type_val_to_name[type->bounds - 1], > policydbp->p_type_val_to_name[bounds->s.value - 1]); > -- > 2.37.3 >
On Thu, Dec 15, 2022 at 5:13 PM James Carter <jwcart2@gmail.com> wrote: > > On Thu, Nov 24, 2022 at 11:40 AM Vit Mojzis <vmojzis@redhat.com> wrote: > > > > Make the error message consistent with other occurrences of the > > same issue: > > https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L243 > > https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L488 > > > > Signed-off-by: Vit Mojzis <vmojzis@redhat.com> > > For these two patches: > Acked-by: James Carter <jwcart2@gmail.com> > Both of these have been merged. Thanks, Jim > > --- > > checkpolicy/policy_define.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c > > index 41e44631..86d57017 100644 > > --- a/checkpolicy/policy_define.c > > +++ b/checkpolicy/policy_define.c > > @@ -1416,7 +1416,7 @@ static int define_typebounds_helper(char *bounds_id, char *type_id) > > if (!type->bounds) > > type->bounds = bounds->s.value; > > else if (type->bounds != bounds->s.value) { > > - yyerror2("type %s has inconsistent master {%s,%s}", > > + yyerror2("type %s has inconsistent bounds %s/%s", > > type_id, > > policydbp->p_type_val_to_name[type->bounds - 1], > > policydbp->p_type_val_to_name[bounds->s.value - 1]); > > -- > > 2.37.3 > >
diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c index 41e44631..86d57017 100644 --- a/checkpolicy/policy_define.c +++ b/checkpolicy/policy_define.c @@ -1416,7 +1416,7 @@ static int define_typebounds_helper(char *bounds_id, char *type_id) if (!type->bounds) type->bounds = bounds->s.value; else if (type->bounds != bounds->s.value) { - yyerror2("type %s has inconsistent master {%s,%s}", + yyerror2("type %s has inconsistent bounds %s/%s", type_id, policydbp->p_type_val_to_name[type->bounds - 1], policydbp->p_type_val_to_name[bounds->s.value - 1]);
Make the error message consistent with other occurrences of the same issue: https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L243 https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/module_compiler.c#L488 Signed-off-by: Vit Mojzis <vmojzis@redhat.com> --- checkpolicy/policy_define.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)