Bug 198617 - selinux is stopping apt from upgrading packages with scripts
Summary: selinux is stopping apt from upgrading packages with scripts
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted   
(Show other bugs)
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-12 11:34 UTC by Leszek Matok
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-31 21:36:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Leszek Matok 2006-07-12 11:34:05 UTC
I thought I have to wait for new selinux-policy to be able to use apt, but no -
new version didn't fix it, so here it goes:
apt (from Extras) is constantly failing to dist-upgrade, leaving two installed
packages of one name in the system (only for packages containing %post scripts).
It looks like this:
Preparing...                ########################################### [100%]
   1:gimp                   ########################################### [100%]
error: %post(gimp-2.2.12-1.fc5.i386) scriptlet failed, exit status 255
W: Some errors occurred while running transaction
and the relevant selinux-policy part is this:
audit(1152697722.877:5): avc:  denied  { transition } for  pid=3682
comm="apt-get" name="bash" dev=hda1 ino=1116367
scontext=user_u:system_r:unconfined_t:s0
tcontext=user_u:system_r:rpm_script_t:s0 tclass=process

Comment 1 Daniel Walsh 2006-07-12 13:39:51 UTC
If you label apt rpm_exec_t does it work?

chcon -t rpm_exec_t /usr/bin/apt

Comment 2 Leszek Matok 2006-07-12 14:09:43 UTC
Actually it's /usr/bin/apt-get or /usr/bin/apt-shell. chcon -t rpm_exec_t fixes
each of them. Other programs in the apt suite can't install packages, AFAIK.

Comment 3 Leszek Matok 2006-07-31 21:36:28 UTC
Looks fixed in selinux-policy-targeted-2.3.3-8.fc5, I'll try to close it as
resolved :)


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