Bug 461059
| Summary: | SELinux is preventing hostname (hostname_t) "read" to /var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t). and SELinux is preventing ifconfig (ifconfig_t) "read" to /var/lib/dhclient/dhclient-eth0.leases (dhcpc_state_t). | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Matěj Cepl <mcepl> | ||||||
| Component: | dhcp | Assignee: | Dave Cantrell <dcantrell> | ||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | rawhide | CC: | dcantrell, dwalsh, mcepl, wwoods, zprikryl | ||||||
| Target Milestone: | --- | Keywords: | Patch, SELinux | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2008-09-26 02:59:08 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Matěj Cepl
2008-09-03 21:28:58 UTC
This is a leaked file descriptor to /var/lib/dhclient/dhclient-eth0.leases Please close open file descriptors before execing apps. fcntl(fd, F_SETFD, FD_CLOEXEC) Since /var/lib/dhclient/dhclient-eth0.leases is created by dhclient, it seems that the bug isn't in hostname nor in ifconfig, but it is in dhclient. So, I'm reassigning this to dhcp package. Created attachment 316916 [details]
dhcp-4.0.0-FD_CLOEXEC.patch
This bug keeps getting filed in rawhide and I don't know what I'm doing wrong in dhclient. I've set every dhclient-INTERFACE.leases file descriptor to include FD_CLOEXEC, so I don't know what I'm missing. I do F_GETFD, |= FD_CLOEXEC to it, then F_SETFD. Is this correct for selinux? You need to do this before the fork I believe, Why not do it as soon as the file is opened? (In reply to comment #5) > You need to do this before the fork I believe, Why not do it as soon as the > file is opened? That's what I'm doing. Setting FD_CLOEXEC right when the files are opened. Then it should work. You could check by listing ls -l /proc/self/fd in the script to see what is open. This should be working with the latest dhclient package in rawhide. |