Bug 175564 - rpm scriptlet useradd/group add fails.
Summary: rpm scriptlet useradd/group add fails.
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-securitylevel
Version: 5
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Chris Lumens
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-12-12 20:20 UTC by bkyoung
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2005-12-15 17:06:16 UTC

Attachments (Terms of Use)

Description bkyoung 2005-12-12 20:20:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051202 Fedora/1.5-1 Firefox/1.5

Description of problem:
A shadow-utils useradd and/or groupadd attempt fails within RPM scriptlets (when rpm -i run as root.)

Will selinux-policy-targeted be adjusted to allow action? And will system-config-securitylevel have a "Modify SELinux Policy" option for RPM to allow/disallow action?

if test $1 -eq 1; then
    /usr/sbin/useradd joe

Version-Release number of selected component (if applicable):
selinux-policy-targeted-1.27.2-19 , system-config-securitylevel-1.6.9-1

How reproducible:

Steps to Reproduce:
Assume daemon-1.1.i386.rpm is the package containing the %pre scriptlet.
Attmpt to install a daemon package adding/removing its runtime user/group automatically.

1. rpm -i daemon-1.1.i386.rpm

Actual Results:  Install failed.

Expected Results:  The daemon user/group should have been added, and install successful.

Additional info:

begin audit.log output:
type=USER_CHAUTHTOK msg=audit(1134416335.934:253): user pid=14136 uid=0 auid=0 msg='op=adding group acct=pvpgn exe="/usr/sbin/groupadd" (hostname=?, addr=?, terminal=tty3 res=success)'
type=AVC msg=audit(1134416335.938:254): avc:  denied  { create } for  pid=14136 comm="groupadd" name="group+" scontext=root:system_r:rpm_script_t:s0-s0:c0.c255 tcontext=system_u:object_r:etc_t:s0 tclass=file
type=SYSCALL msg=audit(1134416335.938:254): arch=40000003 syscall=5 success=no exit=-13 a0=bfccd048 a1=8241 a2=1b6 a3=938c8c0 items=1 pid=14136 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 comm="groupadd" exe="/usr/sbin/groupadd"
type=CWD msg=audit(1134416335.938:254):  cwd="/"
type=PATH msg=audit(1134416335.938:254): item=0 name="/etc/group+" flags=310  inode=3485633 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00
type=USER_CHAUTHTOK msg=audit(1134416335.942:255): user pid=14136 uid=0 auid=0 msg='op=adding group acct=pvpgn exe="/usr/sbin/groupadd" (hostname=?, addr=?, terminal=tty3 res=failed)'
end audit.log output:

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