Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 674756 Details for
Bug 890301
[hypervkvpd] Denied read/write when injecting IP to RHEL6.4 guest from Hyper-V Server 2012
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Use CLOEXEC to prevent file descriptor leakage
0002-tools-hv-Use-CLOEXEC-when-opening-kvp_pool-files.patch (text/plain), 1.64 KB, created by
Tomáš Hozza
on 2013-01-08 12:20:16 UTC
(
hide
)
Description:
Use CLOEXEC to prevent file descriptor leakage
Filename:
MIME Type:
Creator:
Tomáš Hozza
Created:
2013-01-08 12:20:16 UTC
Size:
1.64 KB
patch
obsolete
>From e1ecfbcf88062b5ff522c9eea75f13226a50f356 Mon Sep 17 00:00:00 2001 >From: Tomas Hozza <thozza@redhat.com> >Date: Tue, 8 Jan 2013 12:10:27 +0100 >Subject: [PATCH 2/2] tools: hv: Use CLOEXEC when opening kvp_pool files > >Use CLOEXEC flag when opening kvp_pool_x files to prevent file >descriptor leakage. Not using it was causing a problem when >SELinux was enabled. > >Signed-off-by: Tomas Hozza <thozza@redhat.com> >--- > tools/hv/hv_kvp_daemon.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c >index 6b56b75..31f839cc 100644 >--- a/tools/hv/hv_kvp_daemon.c >+++ b/tools/hv/hv_kvp_daemon.c >@@ -151,7 +151,7 @@ static void kvp_update_file(int pool) > */ > kvp_acquire_lock(pool); > >- filep = fopen(kvp_file_info[pool].fname, "w"); >+ filep = fopen(kvp_file_info[pool].fname, "we"); > if (!filep) { > kvp_release_lock(pool); > syslog(LOG_ERR, "Failed to open file, pool: %d", pool); >@@ -182,7 +182,7 @@ static void kvp_update_mem_state(int pool) > > kvp_acquire_lock(pool); > >- filep = fopen(kvp_file_info[pool].fname, "r"); >+ filep = fopen(kvp_file_info[pool].fname, "re"); > if (!filep) { > kvp_release_lock(pool); > syslog(LOG_ERR, "Failed to open file, pool: %d", pool); >@@ -246,13 +246,13 @@ static int kvp_file_init(void) > records_read = 0; > num_blocks = 1; > sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i); >- fd = open(fname, O_RDWR | O_CREAT, 0644 /* rw-r--r-- */); >+ fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */); > > if (fd == -1) > return 1; > > >- filep = fopen(fname, "r"); >+ filep = fopen(fname, "re"); > if (!filep) > return 1; > >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 890301
:
674755
| 674756 |
674758
|
676926