Skip to contentSkip to conversation

semanage fails when conflicting types are in current or subdirectory

DISCUSSION Daniel Black 1 participant 1 message Nov 6, 2012 1 message not in the archive SELinux security module

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Just a heads up to anyone who comes across as similar problem.

On a fairly basic centos 6.3 machine:

selinux-policy.noarch                                 3.7.19-155.el6_3.4                        @updates                                
selinux-policy-targeted.noarch                        3.7.19-155.el6_3.4                        @updates       
$ sudo semanage permissive -a munin_services_plugin_t
/usr/sbin/semanage: compilation failed:
/usr/share/selinux/devel/include/Makefile:151: *** multiple target patterns.  Stop.

line 151 is
all: $(all_packages)

It turns out I had a t.te in the currently directory containing #============= munin_services_plugin_t ==============
allow munin_services_plugin_t unconfined_t:sem { unix_read unix_write };

with its corresponding t.pp file. As semanage called make -f /usr/share/selinux/devel/include/Makefile some of the current directory was significant. As the makefile calls find some of the subdirectories could also be significant. I created an empty directory and ran semanage from that directory and it worked ok.

The order and cause could be slightly off here. In the rush to get a right solution I didn't record the details that well.

Signature · 7 lines
Daniel Black, Engineer @ Open Query (http://openquery.com)
Remote expertise & maintenance for MySQL/MariaDB server environments.

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.