as root but in running in the selinux context sysadm_t run virt-clone and you will get a couple denials. The problem is that virt-clone calls out to other programs (like ifconfig) but has not set the virt-clone.log file to be close on exec. Since ifconfig doesn't (when confined by selinux) has permissions to append to this log file we get the denials. Mostly likely you need something like below right after you open the log file: fcntl.fcntl(fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC) (or make sure you pass the O_CLOEXEC flag when you open it...)
While I agree that we should be setting FD_CLOEXEC, more important is that we should not be spawning external programs like 'ifconfig' at all. This is a historical hack to workaround lack of suitable APIs in libvirt, but we addressed this problem several releases ago now. The call to ifconfig can be replaced by libvirt API calls to node device APIs to enumerate host network interfaces & their mac addresses.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.
Since we just use the standard python 'logging' module, I think we would need support there to enable close-on-exec. Reassigning to python
Can you provide a link to the code that you're using? In particular, how have you configured "logging" - which handlers are you using. I notice that "man fopen" has this non-standard mode character: "e"(since glibc 2.7) Open the file with the O_CLOEXEC flag. See open(2) for more information. logging.FileHandler passes on the given mode string to the "open" builtin function when opening the file; _PyFile_SanitizeMode does some checking of this So could this be solved by adding "e" to the end of the mode string in your logging configuration?
Note to self: see also this patch from danpb http://lists.xensource.com/archives/html/xen-devel/2006-08/msg00867.html
Ah, I did not know that mode was passed through to fopen. Thanks for the quick response, I'll assign this back to virtinst and whip up a patch soon.
This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Still present, reassigning to rawhide.
Fixed upstream: http://hg.fedorahosted.org/hg/python-virtinst/rev/e07b707b1d94
This should be in latest rawhide.