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): amanda-server-2.5.2p1-10.fc9.i386 amanda-2.5.2p1-10.fc9.i386 amanda-client-2.5.2p1-10.fc9.i386 selinux-policy-3.3.1-64.fc9.noarch 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 under: /etc/amanda/DailySet1/index/ Which results in not being able to select any files for restore. 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
Created attachment 309951 [details] output from setroubleshoot
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
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.
Does restorecon -V /etc/amanda change anything?
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.
(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 unconfined_u:object_r:amanda_config_t:s0->system_u:object_r:amanda_data_t:s0 However, no change in result when trying to restore files using amrecover. The output from setroubleshoot is the same as original report.
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.
Created attachment 311059 [details] output from setroubleshoot
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
After installing selinux-policy-3.3.1-78.fc9.noarch, I am now able to recover files from an amanda backup tape using amrecover.