RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 833828 - SELinux is preventing groupadd in rpm preinstall scriptlet
Summary: SELinux is preventing groupadd in rpm preinstall scriptlet
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
high
high
Target Milestone: beta
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 12:48 UTC by Miroslav Vadkerti
Modified: 2012-06-20 19:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 19:16:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Vadkerti 2012-06-20 12:48:12 UTC
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 14:25:52 UTC
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.