diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-22 11:36:06 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-22 15:06:45 +1000 |
commit | efcff0996d8c9a42e3bbef4a805ff65974684ff0 (patch) | |
tree | cf62c859753c3564e3a52fbd54bc225398e5977b /discover | |
parent | 675eb751ff84e80f286da808daa931a84baf9302 (diff) | |
download | talos-petitboot-efcff0996d8c9a42e3bbef4a805ff65974684ff0.tar.gz talos-petitboot-efcff0996d8c9a42e3bbef4a805ff65974684ff0.zip |
discover/ipmi: Open devnode with O_CLOEXEC
The IPMI device node is kept open for the life of the platform - include
the O_CLOEXEC flag so it is not kept open for child processes.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover')
-rw-r--r-- | discover/ipmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/ipmi.c b/discover/ipmi.c index 2aaf114..d652e9f 100644 --- a/discover/ipmi.c +++ b/discover/ipmi.c @@ -201,7 +201,7 @@ struct ipmi *ipmi_open(void *ctx) struct ipmi *ipmi; int fd; - fd = open(ipmi_devnode, O_RDWR); + fd = open(ipmi_devnode, O_RDWR | O_CLOEXEC); if (fd < 0) { pb_log("IPMI: can't open IPMI device %s: %m\n", ipmi_devnode); return NULL; |