Location of audit2allow python script is external/selinux/prebuilts/bin/audit2allow
When I try to run the script, I get the following error:
Traceback (most recent call last):
File "/home/shobhit/Desktop/Code/aosp/msm8909_android/external/selinux/policycoreutils/audit2allow/audit2allow", line 24, in <module>
import sepolgen.audit as audit
File "/home/shobhit/Desktop/Code/aosp/msm8909_android/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages/sepolgen/audit.py", line 20, in <module>
import refpolicy
File "/home/shobhit/Desktop/Code/aosp/msm8909_android/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages/sepolgen/refpolicy.py", line 22, in <module>
import selinux
File "/home/shobhit/Desktop/Code/aosp/msm8909_android/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages/selinux/__init__.py", line 28, in <module>
_selinux = swig_import_helper()
File "/home/shobhit/Desktop/Code/aosp/msm8909_android/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages/selinux/__init__.py", line 24, in swig_import_helper
_mod = imp.load_module('_selinux', fp, pathname, description)
ImportError: /home/shobhit/Desktop/Code/aosp/msm8909_android/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages/selinux/_selinux.so: undefined symbol: selabel_partial_match
I know this is an old question, but...
Was a python version issue on my machine. Changed the python link to point to python2 instead to python3 and everything worked fine. Maybe there is a more elegant solution than to (temporarily) change links, but it worked, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With