Bug 760813 - SELinux is preventing /usr/sbin/useradd from 'write' accesses on the directory /var/lib/xguest.
Summary: SELinux is preventing /usr/sbin/useradd from 'write' accesses on the director...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:76d4a23200523af8024dd864bd7...
: 765680 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-07 02:39 UTC by Harish Pillay
Modified: 2013-01-15 10:48 UTC (History)
5 users (show)

Fixed In Version: xguest-1.0.10-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-21 17:00:28 UTC
Type: ---


Attachments (Terms of Use)
File: description (3.24 KB, text/plain)
2011-12-07 02:39 UTC, Harish Pillay
no flags Details

Description Harish Pillay 2011-12-07 02:39:08 UTC
libreport version: 2.0.7
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.4-1.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/useradd from 'write' accesses on the directory /var/lib/xguest.
time:           Wed 07 Dec 2011 10:38:48 AM

description:    Text file, 3322 bytes

Comment 1 Harish Pillay 2011-12-07 02:39:12 UTC
Created attachment 541657 [details]
File: description

Comment 2 Harish Pillay 2011-12-07 02:59:58 UTC
I did run:
grep useradd /var/log/audit/audit.log | audit2allow -M mypol

and:

semodule -i mypol.pp 

and redid yum install xguest and gives the same sealert exception.

Comment 3 Miroslav Grepl 2011-12-07 12:01:22 UTC
This is a policy issue. If you want to fix it now, you cat do it using these steps

# systemctl stop auditd.service
# semanage permissive -a useradd_t
# yum install xguest
# systemctl start auditd.service
# semanage permissive -d useradd_t

Comment 7 Harish Pillay 2011-12-07 15:54:41 UTC
Thanks for the suggestion.

This is what I just did:

# systemctl stop auditd.service
# semanage permissive -a useradd_t
# yum install xguest -y

Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xguest.noarch 0:1.0.10-1.fc16 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch            Version                  Repository       Size
================================================================================
Installing:
 xguest          noarch          1.0.10-1.fc16            fedora           60 k

Transaction Summary
================================================================================
Install       1 Package

Total download size: 60 k
Installed size: 60 k
Downloading Packages:
xguest-1.0.10-1.fc16.noarch.rpm                          |  60 kB     00:00     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package xguest-1.0.10-1.fc16.noarch
/usr/sbin/semanage: Could not start semanage transaction
error: %pre(xguest-1.0.10-1.fc16.noarch) scriptlet failed, exit status 1

Failed:
  xguest.noarch 0:1.0.10-1.fc16                                                 

Complete!

So, it looks like there is more to it.

Harish

Comment 8 Daniel Walsh 2011-12-07 17:17:00 UTC
Ok, I just built a new version of xguest package that will install in the proper directory and run everything in the post script.

We have also fixed up some of the policy to allow useradd to do its thing.

Comment 9 Fedora Update System 2011-12-07 17:17:47 UTC
xguest-1.0.10-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/xguest-1.0.10-2.fc16

Comment 10 Miroslav Grepl 2011-12-07 17:58:11 UTC
Could you test it with this xguest package and with the latest policy from koji

http://koji.fedoraproject.org/koji/buildinfo?buildID=278216

Thank you.

Comment 11 Miroslav Grepl 2011-12-09 08:45:02 UTC
*** Bug 765680 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2011-12-10 20:08:38 UTC
Package xguest-1.0.10-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xguest-1.0.10-2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16944/xguest-1.0.10-2.fc16
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2011-12-21 17:00:28 UTC
xguest-1.0.10-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 bodhi.zazen 2011-12-22 16:07:53 UTC
The new package installed without any error message in the terminal, but did not configure the xguest account.

guest is not listed in the users on the gdm screen, and there is no user guest or xguest in /etc/passwd .

Comment 15 Daniel Walsh 2011-12-22 16:14:39 UTC
yum remove xguest
userdel xguest
semanage login -d xguest
yum install xguest

And see if this works correctly.

Comment 16 bodhi.zazen 2011-12-23 05:23:55 UTC
Thank you Daniel Walsh, but that did not work.

After those commands, still no user xguest

id xguest
id: xguest: No such user

so I again removed xguest, put selinux into permissive mode, and installed.

yum remove xguest
setenforce 0
yum install xguest
setenforce 1

Now xguest is installed.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 17 Miroslav Grepl 2012-01-02 14:49:06 UTC
Are there any AVC msgs in permissive mode?

$ yum remove xguest
$ setenforce 0
$ yum install xguest
$ setenforce 1
$ ausearch -m avc -ts recent

Comment 18 bodhi.zazen 2012-01-05 05:08:18 UTC
Thank you Miroslav, no, nothing when running that command (after removing, and re-installing in permissive mode ... )

ausearch -m avc -ts recent
<no matches>




-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


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