Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP5:GA
slurm.31080
U_11-Switch-creat-to-open-with-O_EXCL.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_11-Switch-creat-to-open-with-O_EXCL.patch of Package slurm.31080
From: Tim Wickberg <tim@schedmd.com> Date: Wed Oct 11 12:45:25 2023 -0600 Subject: [PATCH 11/19]Switch creat() to open() with O_EXCL. Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: c3cb63c0068166d659cbe86520534d0f3e542b80 References: bsc#1216207 Signed-off-by: Egbert Eich <eich@suse.de> Protect against apinfo having been created as a dangling symlink. Co-authored-by: Alejandro Sanchez <alex@schedmd.com> --- src/plugins/mpi/cray_shasta/apinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mpi/cray_shasta/apinfo.c b/src/plugins/mpi/cray_shasta/apinfo.c index d33c30ed88..79c8e1092f 100644 --- a/src/plugins/mpi/cray_shasta/apinfo.c +++ b/src/plugins/mpi/cray_shasta/apinfo.c @@ -381,7 +381,7 @@ static int _open_apinfo(const stepd_step_rec_t *job) apinfo = xstrdup_printf("%s/apinfo", appdir); // Create file - fd = creat(apinfo, 0600); + fd = open(apinfo, (O_CREAT | O_WRONLY | O_TRUNC | O_EXCL), 0600); if (fd == -1) { error("%s: Couldn't open apinfo file %s: %m", plugin_type, apinfo);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor