Message ID | 20240122135507.63506-8-cgzones@googlemail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8ad3ce721e0b |
Delegated to: | Petr Lautrbach |
Headers | show |
Series | [01/15] checkpolicy: add libfuzz based fuzzer | expand |
On Mon, Jan 22, 2024 at 8:55 AM Christian Göttsche <cgzones@googlemail.com> wrote: > > Return early on invalid roles in user definition. > > Signed-off-by: Christian Göttsche <cgzones@googlemail.com> 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 97582630..44236797 100644 > --- a/checkpolicy/policy_define.c > +++ b/checkpolicy/policy_define.c > @@ -4244,7 +4244,7 @@ int define_user(void) > > while ((id = queue_remove(id_queue))) { > if (set_user_roles(&usrdatum->roles, id)) > - continue; > + return -1; > } > > if (mlspol) { > -- > 2.43.0 > >
On Tue, Feb 13, 2024 at 3:36 PM James Carter <jwcart2@gmail.com> wrote: > > On Mon, Jan 22, 2024 at 8:55 AM Christian Göttsche > <cgzones@googlemail.com> wrote: > > > > Return early on invalid roles in user definition. > > > > Signed-off-by: Christian Göttsche <cgzones@googlemail.com> > > Acked-by: James Carter <jwcart2@gmail.com> > 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 97582630..44236797 100644 > > --- a/checkpolicy/policy_define.c > > +++ b/checkpolicy/policy_define.c > > @@ -4244,7 +4244,7 @@ int define_user(void) > > > > while ((id = queue_remove(id_queue))) { > > if (set_user_roles(&usrdatum->roles, id)) > > - continue; > > + return -1; > > } > > > > if (mlspol) { > > -- > > 2.43.0 > > > >
diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c index 97582630..44236797 100644 --- a/checkpolicy/policy_define.c +++ b/checkpolicy/policy_define.c @@ -4244,7 +4244,7 @@ int define_user(void) while ((id = queue_remove(id_queue))) { if (set_user_roles(&usrdatum->roles, id)) - continue; + return -1; } if (mlspol) {
Return early on invalid roles in user definition. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> --- checkpolicy/policy_define.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)