File U_04-Remove-problematic-chmod.patch of Package slurm.31097
From: Tim Wickberg <tim@schedmd.com>
Date: Wed Oct 11 12:45:25 2023 -0600
Subject: [PATCH 4/19]Remove problematic chmod().
Patch-mainline: Upstream
Git-repo: https://github.com/SchedMD/slurm
Git-commit: ddc5271e9c107b60f25213bd504c76036b92a6d2
References: bsc#1216207,CVE-2023-41914
Signed-off-by: Egbert Eich <eich@suse.de>
Just assume the slurmstepd's umask isn't set to something bizarre, and the
0700 permissions we asked for when creating the directory are in place.
Co-authored-by: Alejandro Sanchez <alex@schedmd.com>
---
src/plugins/mpi/pmix/pmixp_utils.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/plugins/mpi/pmix/pmixp_utils.c b/src/plugins/mpi/pmix/pmixp_utils.c
index 75809fb089..e3cb84474b 100644
--- a/src/plugins/mpi/pmix/pmixp_utils.c
+++ b/src/plugins/mpi/pmix/pmixp_utils.c
@@ -546,14 +546,6 @@ int pmixp_mkdir(char *path)
return errno;
}
- /* There might be umask that will drop essential rights.
- * Fix it explicitly.
- * TODO: is there more elegant solution? */
- if (chmod(path, rights) < 0) {
- error("%s: chown(%s): %m", __func__, path);
- return errno;
- }
-
if (chown(path, (uid_t) pmixp_info_jobuid(), (gid_t) -1) < 0) {
error("%s: chown(%s): %m", __func__, path);
return errno;