Bug 1234080 - libsepol.permission_copy_callback: Module depends on permission kill in class service, not satisfied
Summary: libsepol.permission_copy_callback: Module depends on permission kill in class...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-21 04:04 UTC by David Highley
Modified: 2015-11-20 17:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-22 14:23:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Highley 2015-06-21 04:04:28 UTC
Description of problem:
All locally created policies get this error; libsepol.permission_copy_callback: Module my_logrotate depends on permission kill in class service, not satisfied (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).

Version-Release number of selected component (if applicable):
libsepol-2.3-4.fc22.x86_64

How reproducible:
Every time try to install or remove local policy.

Steps to Reproduce:
1.semodule -i *.pp
2.
3.

Actual results:


Expected results:


Additional info:
Even though the policies are listed as installed we get avc's for things the policies are set to allow. Firewall is not working because of this issue.

Comment 1 Robin Powell 2015-06-22 08:27:07 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1226436 and https://bugzilla.redhat.com/show_bug.cgi?id=1149790 (the latter implies that this is a regression?)

Comment 2 Robin Powell 2015-06-22 08:27:48 UTC
So this is actually really bad; I can't disable or remove any local modules, either:

rlpowell@basti> sudo semanage module -d myvirshbugs880971
libsepol.permission_copy_callback: Module mylibvirtnumad1101802 depends on permission kill in class service, not satisfied (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
OSError: No such file or directory
rlpowell@basti> sudo semanage module -d mylibvirtnumad1101802
libsepol.permission_copy_callback: Module myvirshbugs880971 depends on permission kill in class service, not satisfied (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
OSError: No such file or directory
rlpowell@basti> sudo semanage module -r myvirshbugs880971
libsepol.permission_copy_callback: Module mylibvirtnumad1101802 depends on permission kill in class service, not satisfied (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or directory).
OSError: No such file or directory

Comment 3 Miroslav Grepl 2015-06-22 14:23:39 UTC
Actually this is caused by the policy. We removed these permissions in F22 and you need to rebuild your modules with the installed policy and then you can manage them using semanage.

Comment 4 Miroslav Grepl 2015-06-22 14:24:35 UTC
(In reply to Miroslav Grepl from comment #3)
> Actually this is caused by the policy. We removed these permissions in F22
> and you need to rebuild your modules with the installed policy and then you
> can manage them using semanage.

This is a problem between F21 vs. F22 modules.

Comment 5 Robin Powell 2015-06-22 19:20:04 UTC
Umm, sure, and the obvious way to rebuild them is to *delete them* using semanage, which I can't do.  Just rebuilding them is tricky because I use a puppet module for the builds and I haven't done one by hand in ages; I guess I could make a one character change to all my modules to make them regen?

Ah, here we go.

So for everybody else: what I did was find all the .pp files (i.e. sudo find /etc | grep my | grep -v mysql | grep -v mythtv | grep '\.pp' or whatever works for you) and then simply deleted them (i.e. sudo rm /etc/selinux/mymodules/mypuppetedit/mypuppetedit.pp /etc/selinux/mymodules/myvirshbugs880971/myvirshbugs880971.pp ...).

After puppet rebuilt them, everything is fine.  I dunno about NOTABUG.  IMO, semanage not being able to remove invalid modules is *absolutely* a bug.  But at least I have a workaround.

Comment 6 ilmostro7 2015-11-15 11:28:49 UTC
yah, same here; upgrading from F21 -> F22 somehow got the whole system messed up.  Missing dependencies for modules, missing modules arrrgh.  Good stuff, NOTABUG, feature? ;)

Comment 7 Miroslav Grepl 2015-11-20 09:21:29 UTC
Robin,
thank you you wrote this workaround for this case when you can not "just" rebuild/load. Unfortunately there is no easy way how to solve it.

ilmostro7,
what issue did you get?

Comment 9 ilmostro7 2015-11-20 17:31:04 UTC
I'm not sure **how** this occurred since, apparently, this is not a **standard** issue facing all users; unless the upgrade process of a certain selinux-policy\* module(s) finished uncleanly somehow.


Note You need to log in before you can comment on or make changes to this bug.