semodule - global requirements not met

Trying to fix an issue with snmp, I started by building an snmp module using audit2allow. It kept failing to load, and the error message is a little cryptic...

[root@host thomas]# semodule -i snmp.pp
libsepol.print_missing_requirements: snmp's global requirements were not met: type/attribute snmpd_t (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
semodule: Failed!

The .te file for the module looks like this:

module snmp 1.0;

require {
type var_log_t;
type snmpd_t;
class file read;

#============= snmpd_t ==============
allow snmpd_t var_log_t:file read;

Fix is simple enough, it's the error message that's a bit's just that there already is an snmp module loaded.

[root@host thomas]# semodule -l |grep snmp
snmp 1.10.2

I just changed the module name to my-snmp and it works fine.

[root@host thomas]# semodule -l |grep snmp
my-snmp 1.0
snmp 1.10.2

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

About the Author...

Slides from LISA 2019 Linux systems troubleshooting #LISA2019 Tue Oct 29 05:59:30 +0000 2019 configuring grub2 with EFI Fri Sep 13 05:20:01 +0000 2019

I published a Thing on @thingiverse! #thingalert Tue Jul 23 19:27:57 +0000 2019

Nokogiri install on MacOSX Fri Jul 12 15:06:49 +0000 2019

HTML email with plain mailer plugin on Jenkins Thu Jul 11 21:07:25 +0000 2019