This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 833828 - SELinux is preventing groupadd in rpm preinstall scriptlet
SELinux is preventing groupadd in rpm preinstall scriptlet
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.0
All Linux
high Severity high
: beta
: ---
Assigned To: Daniel Walsh
BaseOS QE Security Team
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 08:48 EDT by Miroslav Vadkerti
Modified: 2012-06-20 15:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 15:16:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Vadkerti 2012-06-20 08:48:12 EDT
Description of problem:
When trying to reinstall opencryptoki package with manually removed pkcs11 group, this is not recreated properly again with preinstall scriptlet. When I put SELinux in permissive I do not hit this issue.

I see these no-audit SELinux denials:
time->Wed Jun 20 12:25:32 2012
type=SYSCALL msg=audit(1340209532.030:97376): arch=c000003e syscall=87 success=yes exit=0 a0=7fffdd72cac0 a1=7fffdd72c9e0 a2=1 a3=7f87b4f136ad items=0 ppid=2366 pid=2368 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=4144 comm="groupadd" exe="/usr/sbin/groupadd" subj=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1340209532.030:97376): avc:  denied  { unlink } for  pid=2368 comm="groupadd" name="group.2368" dev="dm-1" ino=524365 scontext=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file
type=AVC msg=audit(1340209532.030:97376): avc:  denied  { remove_name } for  pid=2368 comm="groupadd" name="group.2368" dev="dm-1" ino=524365 scontext=unconfined_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir


Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-131.el7
opencryptoki-2.4.1-1.el7

How reproducible:
100%

Steps to Reproduce:
1. Install opencryptoki package
2. groupdel pkcs11
3. Reinstall opencryptoki package
4. getent group pkcs11

Actual results:
Group not available

Expected results:
Group not available

Additional info:
Comment 2 Milos Malik 2012-06-20 10:25:52 EDT
Packages on my machine have the same NVRs, but I don't see those AVCs when following the steps to reproduce. Did you change the SELinux configuration somehow?

Is your /etc directory labelled correctly?

# restorecon -Rv /etc

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