Tools: hv: kvp: ensure kvp device fd is closed on exec
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 7 Jul 2016 01:24:10 +0000 (18:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 11:05:41 +0000 (13:05 +0200)
commit26840437cbd6d3625ea6ab34e17cd34bb810c861
tree0aee0f74ee4cb855de329048de49bb5edef56bb6
parent3724287c0ec472815ebe5ae3790f77965c6aa557
Tools: hv: kvp: ensure kvp device fd is closed on exec

KVP daemon does fork()/exec() (with popen()) so we need to close our fds
to avoid sharing them with child processes. The immediate implication of
not doing so I see is SELinux complaining about 'ip' trying to access
'/dev/vmbus/hv_kvp'.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_kvp_daemon.c