Skip to content

Instantly share code, notes, and snippets.

@lemenkov
Created October 4, 2013 13:48
Show Gist options
  • Save lemenkov/6826209 to your computer and use it in GitHub Desktop.
Save lemenkov/6826209 to your computer and use it in GitHub Desktop.
Manually build selinux module
semodule -DB
....
module allowsnmpdtmp 1.0;
require {
type system_cronjob_tmp_t;
type snmpd_t;
class file { read open ioctl getattr };
}
#============= snmpd_t ==============
allow snmpd_t system_cronjob_tmp_t:file { read open ioctl getattr };
....
checkmodule -M -m -o allowsnmpdtmp.mod allowsnmpdtmp.te
semodule_package -o allowsnmpdtmp.pp -m allowsnmpdtmp.mod
semodule -i allowsnmpdtmp.pp
semodule -B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment