Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452320 - selinux prevents amrecover (amanda index database browser) from restoring files
Summary: selinux prevents amrecover (amanda index database browser) from restoring files
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-20 21:46 UTC by Craig Goodyear
Modified: 2008-07-24 18:06 UTC (History)
1 user (show)

Fixed In Version: 78
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-07-24 18:06:06 UTC

Attachments (Terms of Use)
output from setroubleshoot (deleted)
2008-06-20 21:49 UTC, Craig Goodyear
no flags Details
output from setroubleshoot (deleted)
2008-07-04 21:46 UTC, Craig Goodyear
no flags Details

Description Craig Goodyear 2008-06-20 21:46:36 UTC
Description of problem:
Selinux prevents amrecover from selecting the disk name from 
an Amanda backup.  After starting amrecover as root, trying 
to use the setdisk command to select the disk name to recover 
from is prevented by selinux.

Version-Release number of selected component (if applicable):

How reproducible:
Occurs every time amrecover is run.

Steps to Reproduce:
1. run amrecover
2. try to select disk name with setdisk command
Actual results:
selinux prevents root from writing to directory where the 
index file for the backup is located, in the proper directory 
Which results in not being able to select any files for 

Expected results:
Select the disk to restore from using the setdisk command.

Additional info:
root extracts the contents of the index file in the directory
where it is located.

output of setroubleshoot is attached below

Comment 1 Craig Goodyear 2008-06-20 21:49:29 UTC
Created attachment 309951 [details]
output from setroubleshoot

Comment 2 Daniel Walsh 2008-06-22 10:34:51 UTC
You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-68.fc9.noarch

Comment 3 Craig Goodyear 2008-06-27 19:20:44 UTC
I have installed selinux-policy-3.3.1-69.fc9.noarch.  
selinux is still preventing amrecover from selecting a disk 
using the setdisk command.  The output from setroubleshoot 
has not changed from the attachment on 6-20-08.

Comment 4 Daniel Walsh 2008-06-29 11:54:14 UTC
Does restorecon -V /etc/amanda 

change anything?

Comment 5 Daniel Walsh 2008-06-29 12:04:27 UTC
selinux-policy-3.3.1-73.fc9.noarch has fixes to allow amanda to create
directories/files in the /etc/amanda directories with the correct context.  

These files should probably not be created under /etc, but in /var/lib or some
other run time directory.

Comment 6 Craig Goodyear 2008-06-29 21:12:52 UTC
(In reply to comment #4)
> Does restorecon -V /etc/amanda 
> change anything?

I ran "restorecon -v -R /etc/amanda" with following output:
restorecon reset /etc/amanda/DailySet1/tapelist context

However, no change in result when trying to restore files
using amrecover.  The output from setroubleshoot is the
same as original report.

Comment 7 Craig Goodyear 2008-07-04 21:45:12 UTC
After installing selinux-policy-3.3.1-74.fc9.noarch, I am
able to select the diskname with the setdisk command.

However, when trying to restore the files, selinux is 
preventing amidxtaped from accessing the tape drive, 
/dev/nst0.  I have tried running restorecon -v 'nst0'.  This
did not help.

I have attached the output from setroubleshoot below.

Comment 8 Craig Goodyear 2008-07-04 21:46:06 UTC
Created attachment 311059 [details]
output from setroubleshoot

Comment 9 Daniel Walsh 2008-07-07 15:18:03 UTC
You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-77.fc9.noarch

Comment 10 Craig Goodyear 2008-07-18 22:01:29 UTC
After installing selinux-policy-3.3.1-78.fc9.noarch, I am 
now able to recover files from an amanda backup tape using 

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