Bug 754924 - SELinux prevents invoking groupadd in %pre script
Summary: SELinux prevents invoking groupadd in %pre script
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-18 09:11 UTC by Akira TAGOH
Modified: 2011-11-21 23:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-21 23:12:19 UTC
Type: ---


Attachments (Terms of Use)

Description Akira TAGOH 2011-11-18 09:11:22 UTC
Description of problem:
Installing Canna package fails to create a group and a user in %pre script.

Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-54.fc17.noarch
selinux-policy-targeted-3.10.0-54.fc17.noarch

How reproducible:
always

Steps to Reproduce:
1.yum install Canna
2.
3.
  
Actual results:
warnings appears like:
warning: user canna does not exist - using root

Expected results:
no warnings

Additional info:
scriptlet itself doesn't fail because it has "exit 0" at the end according to https://fedoraproject.org/wiki/Packaging/UsersAndGroups. I built the testing package got rid of it; http://koji.fedoraproject.org/koji/taskinfo?taskID=3523256

Installing it with rpm gives me an error like:
groupadd: cannot open /etc/group
useradd: group 'canna' does not exist
error: %pre(Canna-3.7p3-33.fc17.x86_64 scriptlet failed, exit status 6
error: Canna-3.7p3-33.fc17.x86_64: install failed

It works fine on Permissive mode.

Comment 1 Daniel Walsh 2011-11-18 14:52:57 UTC
restorecon -R -v /etc

Was this a freshly installed rawhide or upgraded from F16?

Comment 2 Akira TAGOH 2011-11-21 02:23:35 UTC
Ah, thanks. working back.

I think it was installed at f16 development timeframe as rawhide and upgraded.


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