OwlCyberDefense / setools

setools has moved to https://github.com/SELinuxProject/setools
Other
91 stars 34 forks source link

OSError: protocol not found #163

Closed ghost closed 7 years ago

ghost commented 7 years ago

I am encountering the following on Debian with SETools 4.1:

# seinfo   
Traceback (most recent call last):
  File "/usr/bin/seinfo", line 21, in <module>
    import setools
  File "/usr/lib/python3/dist-packages/setools/__init__.py", line 30, in <module>
    from . import policyrep
  File "/usr/lib/python3/dist-packages/setools/policyrep/__init__.py", line 66, in <module>
    from . import netcontext
  File "/usr/lib/python3/dist-packages/setools/policyrep/netcontext.py", line 30, in <module>
    IPPROTO_DCCP = getprotobyname("dccp")
OSError: protocol not found

I suspect that this issue might be reproduce-able as follows:

echo '(portcon "dccp" 80 (system_u object_r httpd_port_t ((s0) (s0))))' > mytest.cil && semodule -i mytest.cil

ghost commented 7 years ago

nevermind, debian issue, setools requires netbase (which provide /etc/protocols)