Closed giuseppe-sec-eng closed 7 years ago
I got this error as well. Installing setools version 4.0.0-beta works for me. In the release notes it say that "This release requires libsepol-2.5, which is unfortunately not available yet on some distributions". Check out your libsepol's version.
@dvur12 Thanks for the response. Where would I get setools version 4.0.0-beta from?
@dvur12
Great! Thanks for your support!
Have you encountered this following errors while executing
~/setools-4.0.0-beta$ python setup.py build
libqpol/policy_define.c: In function ‘define_compute_type_helper’:
libqpol/policy_define.c:1596:8: error: ‘class_perm_node_t {aka struct class_perm_node}’ has no member named ‘tclass’
perm->tclass = i + 1;
^
libqpol/policy_define.c: In function ‘define_te_avtab_helper’:
libqpol/policy_define.c:1810:12: error: ‘class_perm_node_t {aka struct class_perm_node}’ has no member named ‘tclass’
cur_perms->tclass = i + 1;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
@gxp18 No actually I'm sorry
@dvur12 Thank you for your answer.
Now I am having this error:
linux-x86_64-2.7/setools/policyrep/_qpol.so -Wl,--version-script=libqpol/libqpol.map
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libsepol.a(mls.o): unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
If you are using setools-4.0.0-beta you need at least libsepol-2.4. That old release does not respect SEPOL_SRC, so that version will need to be the one installed on your system.
@pebenito
I am trying to use sesearch to open Android sepolicy binary file and I am getting the following error
:~/setools-android/libs/armeabi$ . sesearch
__requires__: command not found
bash: /usr/local/bin/sesearch: line 4: syntax error near unexpected token `'pkg_resources''
bash: /usr/local/bin/sesearch: line 4: `__import__('pkg_resources').require('setools==4.0.0a3')'
That is why I was trying to rebuild the setools 4. Do you have any explanation for the above error?
If I try using the sesearch installed on mu ubuntu machine I get:
sesearch -A ~/sepolicy_repo/sepolicy
[Errno 0] Error: '/home/gxp18/sepolicy_repo/sepolicy'
I am assuming this is because the sesearch for ubuntu is not able to process sepolicy file written for android.
This is the fersion I am currently using.
~$ sesearch --version
4.0.0a3
You should use the copy of setools included in AOSP: https://marc.info/?l=seandroid-list&m=145462393425100&w=2 I don't know if they've updated past 4.0.0-alpha3.
@dvur12 Thanks for you. I updated https://launchpad.net/ubuntu/+source/libsepol/2.6-2/+build/11516465 libsepol fixed the error.
I get the following error messages when executing