Description of problem: A warning is printed. Temporary file is not removed when mock finishes. Version-Release number of selected component (if applicable): mock-1.1.33-1.fc21 How reproducible: 100% Steps to Reproduce: 1. mock --init 2. mock --copyout /etc/resolv.conf /tmp/ Actual results: WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.SCQnfa): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.SCQnfa' Expected results: No warnings printed. /tmp/mock-selinux-plugin.?????? removed. Additional info: Using --disable-plugin=selinux together with --copyout fixes the problem.
Created attachment 858344 [details] drop privs temporarily in copyout for selinux
William, The selinux.py plugin has code that runs privledged durring setup phase: _selinuxCreateFauxFilesystems() But the code to tear-down the above runs as regular user in the case of "copyout". _selinuxAtExit() Honestly I feel the selinux plugin could do a better job of handling the faux filesystem. This is just a copy of the host system's /proc/filesystems, sans any lines containing "selinuxfs". But perhaps I do not appreciate what happens in the chroot with the faux filesystems later on(?), I'm just not sure the temporary copy needs to be owned by root. So the above patch avoids touching selinux plugin. It restores privs so the temporary file can be removed. Thanks for looking it over.
Applied, should go into 1.1.36 build
mock-1.1.36-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc19
mock-1.1.36-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.36-1.fc20
mock-1.1.36-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.36-1.el6
Package mock-1.1.36-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.1.36-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-0467/mock-1.1.36-1.el6 then log in and leave karma (feedback).
mock-1.1.36-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.37-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc19
mock-1.1.37-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-1.fc20
mock-1.1.37-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-1.el6
mock-1.1.37-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc20
mock-1.1.37-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.37-2.fc19
mock-1.1.37-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.37-2.el6
mock-1.1.38-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc19
mock-1.1.38-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.38-1.el6
mock-1.1.38-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.1.38-1.fc20
mock-1.1.38-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.38-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.1.38-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.