Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to non-existant functions in sepolgen python module #332

Open
bigon opened this issue Nov 30, 2021 · 0 comments
Open

Call to non-existant functions in sepolgen python module #332

bigon opened this issue Nov 30, 2021 · 0 comments

Comments

@bigon
Copy link
Contributor

bigon commented Nov 30, 2021

Hello,

Looking at the code of sepolgen, it looks like that some code in policygen.py is using non existing functions seinfo() and sesearch() but this is hidden by the try/catch

Removing the try/catch gives me the following trace:

$ sudo ausearch -m avc -ts yesterday |audit2allow -o foo
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 381, in <module>
    app.main()
  File "/usr/bin/audit2allow", line 369, in main
    self.__output()
  File "/usr/bin/audit2allow", line 339, in __output
    g.add_access(self.__avs)
  File "/usr/lib/python3/dist-packages/sepolgen/policygen.py", line 245, in add_access
    self.__add_av_rule(av)
  File "/usr/lib/python3/dist-packages/sepolgen/policygen.py", line 202, in __add_av_rule
    self.domains = seinfo(ATTRIBUTE, name="domain")[0]["types"]
NameError: name 'seinfo' is not defined

Shouldn't be that bit of code rewritten?

Also, it looks like that this import is now completely useless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant