Bug 198617 - selinux is stopping apt from upgrading packages with scripts
selinux is stopping apt from upgrading packages with scripts
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-12 07:34 EDT by Leszek Matok
Modified: 2007-11-30 17:11 EST (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Leszek Matok 2006-07-12 07:34:05 EDT
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 09:39:51 EDT
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 10:09:43 EDT
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 17:36:28 EDT
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.