Bug 765916 - cobbler 2.2 requires new access permissions
Summary: cobbler 2.2 requires new access permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 816596
TreeView+ depends on / blocked
 
Reported: 2011-12-09 17:03 UTC by Michael Cronenworth
Modified: 2012-04-26 13:27 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.10.0-118.fc17
Clone Of:
: 816596 (view as bug list)
Environment:
Last Closed: 2012-04-25 04:58:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
cobbler AVC log (5.51 KB, text/plain)
2011-12-09 17:03 UTC, Michael Cronenworth
no flags Details
cobbler sync AVC (1.17 KB, text/plain)
2012-02-22 19:40 UTC, Jens Falsmar Oechsler
no flags Details

Description Michael Cronenworth 2011-12-09 17:03:15 UTC
Created attachment 544628 [details]
cobbler AVC log

Description of problem: Cobbler 2.2.1 is sitting in Fedora updates-testing, but it requires new access permissions to perform a sync.


Version-Release number of selected component (if applicable):
cobbler-2.2.1-1.fc15.noarch
selinux-policy-3.9.16-48.fc15.noarch


How reproducible: Always


Steps to Reproduce:
1. Upgrade cobber 2.0.11 to 2.2.1
2. Log in to web interface
3. Click on "Sync" link.
  
Actual results:
Sync fails with permission denied errors.


Expected results:
Sync completes.


Additional info:
I am attaching the AVC log of the denials that I had to allow in order for Sync to work successfully.

Comment 1 Michael Cronenworth 2011-12-09 17:28:25 UTC
I forgot to add that the AVC log also includes denials for cobblerd. I had to enable those as well to get the service cobblerd to start so I could log in to the web interface.

Comment 2 Miroslav Grepl 2011-12-13 08:56:19 UTC
Michael,
could you reproduce it with

# echo "-w /etc/shadow -p wa" >> /etc/audit/audit.rules
# service auditd restart

and then try to click on "Sync" link in permissive mode.

Then we will see full path of dirs, files.

Thank you.

Comment 3 Michael Cronenworth 2011-12-13 14:11:08 UTC
I'm really pressed for time.

The Cobbler maintainer needs to fix this.

Comment 4 Daniel Walsh 2011-12-13 19:17:59 UTC
Michael you have a file named tftp that is labeled etc_t that cobbler wants to write to.

The commands Miroslav gave you will allow you to generate AVC messages with full paths.  Without that we have no idea what is going on here.

Comment 5 Jens Falsmar Oechsler 2012-02-22 19:40:04 UTC
Created attachment 565080 [details]
cobbler sync AVC

Hi

Not sure this is the right place to post, but with Fedora 16 and Cobbler 2.2 I also get some AVC denials with cobbler sync.
One is for tftp file:
# find / -inum 266151
/etc/xinetd.d/tftp
Other is something with dhcpd service restart.

Comment 6 Daniel Walsh 2012-02-22 20:27:45 UTC
Is cobbler rewriting the /etc/xinetd.d/tftp file?

Comment 7 Jens Falsmar Oechsler 2012-02-23 17:16:38 UTC
Yes it is rewritten from a template when you run the sync.

Comment 8 Daniel Walsh 2012-02-23 22:21:06 UTC
Well we will need a new type for this file and will only be able to fix this in F16 and F17.   

How does it replace the file. Does it create a temporary file and then rename it?  If so, what is the name of the file.

Comment 9 Jens Falsmar Oechsler 2012-03-06 18:00:43 UTC
I don't actually know about that for sure. At least I didn't see an AVC for other file name.

What about the error with systemctl?

Comment 10 Daniel Walsh 2012-03-06 19:54:46 UTC
Hopefully scott will answer the question about tftp file.

What is cobbler trying to do here?  Reload the inetd service?

Comment 11 Fedora Admin XMLRPC Client 2012-04-11 22:00:00 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 James C. 2012-04-17 02:14:55 UTC
Cobbler doesn't write a temp file, it rewrites the file in-place via a template (/etc/cobbler/tftpd.template).

Comment 13 Daniel Walsh 2012-04-17 14:08:39 UTC
Fixed in selinux-policy-3.10.0-117.fc17

Comment 14 Fedora Update System 2012-04-23 06:43:56 UTC
selinux-policy-3.10.0-117.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-117.fc17

Comment 15 Fedora Update System 2012-04-24 00:56:42 UTC
selinux-policy-3.10.0-118.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-118.fc17

Comment 16 Fedora Update System 2012-04-24 03:14:38 UTC
Package selinux-policy-3.10.0-118.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-118.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-6452/selinux-policy-3.10.0-118.fc17
then log in and leave karma (feedback).

Comment 17 Milan Zázrivec 2012-04-24 13:55:18 UTC
What does the fix for this bug actually look like?

Does the fix also allow that httpd_cobbler_content_t stuff? If so, wouldn't
the correct fix for that be what's mentioned in

    https://bugzilla.redhat.com/show_bug.cgi?id=813206#c4

?

Comment 18 Fedora Update System 2012-04-25 04:58:40 UTC
selinux-policy-3.10.0-118.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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