Re: [PATCH] python/sepolgen: accept square brackets in FILENAME token

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 28, 2022 at 3:09 PM James Carter <jwcart2@xxxxxxxxx> wrote:
>
> On Mon, Feb 14, 2022 at 4:19 PM Christian Göttsche
> <cgzones@xxxxxxxxxxxxxx> wrote:
> >
> > When parsing Reference Policy style files accept square brackets in file
> > names.  The FILENAME token is used in the TYPE_TRANSITION grammar rule
> > for the optional name based argument.  This name can contain square
> > brackets, e.g. for anonymous inodes like "[io_uring]".
> >
> > Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
>
> Acked-by: James Carter <jwcart2@xxxxxxxxx>
>

Merged.
Thanks,
Jim

> > ---
> > added missing signed-off
> > ---
> >  python/sepolgen/src/sepolgen/refparser.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/python/sepolgen/src/sepolgen/refparser.py b/python/sepolgen/src/sepolgen/refparser.py
> > index e611637f..1bb90564 100644
> > --- a/python/sepolgen/src/sepolgen/refparser.py
> > +++ b/python/sepolgen/src/sepolgen/refparser.py
> > @@ -261,7 +261,7 @@ def t_IDENTIFIER(t):
> >      return t
> >
> >  def t_FILENAME(t):
> > -    r'\"[a-zA-Z0-9_\-\+\.\$\*~ :]+\"'
> > +    r'\"[a-zA-Z0-9_\-\+\.\$\*~ :\[\]]+\"'
> >      # Handle any keywords
> >      t.type = reserved.get(t.value,'FILENAME')
> >      return t
> > --
> > 2.34.1
> >




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux