SHA256
1
0
forked from pool/slurm
slurm/slurmctld-uses-xdaemon_-for-systemd.patch
Egbert Eich 55d6d2b0c7 Accepting request 615950 from home:mslacken
- Fix security issue in handling of username and gid fields
  CVE-2018-10995 what implied an update from 17.11.5 to 17.11.7
- Update from 17.11.5 to 17.11.7
  Highlights of 17.11.6:
  * CRAY - Add slurmsmwd to the contribs/cray dir
  * PMIX - Added the direct connect authentication.
  * Prevent the backup slurmctld from losing the active/available node
    features list on takeover.
  * Be able to force power_down of cloud node even if in power_save state.
  * Allow cloud nodes to be recognized in Slurm when booted out of band.
  * Numerous fixes - check 'NEWS' file.
  Highlights of 17.11.7:
  * Notify srun and ctld when unkillable stepd exits.
  * Numerous fixes - check 'NEWS' file.

OBS-URL: https://build.opensuse.org/request/show/615950
OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=58
2018-06-11 10:31:14 +00:00

49 lines
1.3 KiB
Diff

From f0650e14983c9551fd644697285d84b35dad16aa Mon Sep 17 00:00:00 2001
From: Christian Goll <cgoll@suse.de>
Date: Mon, 9 Apr 2018 10:23:01 +0200
Subject: [PATCH 2/6] slurmctld uses xdaemon_* for systemd
---
src/slurmctld/controller.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c
index 7867e1d479..bd1c12600e 100644
--- a/src/slurmctld/controller.c
+++ b/src/slurmctld/controller.c
@@ -250,7 +250,7 @@ static bool _wait_for_server_thread(void);
/* main - slurmctld main function, start various threads and process RPCs */
int main(int argc, char **argv)
{
- int cnt, error_code, i;
+ int cnt, error_code, i, fd;
struct stat stat_buf;
struct rlimit rlim;
/* Locks: Write configuration, job, node, and partition */
@@ -298,7 +298,11 @@ int main(int argc, char **argv)
if (daemonize) {
slurmctld_config.daemonize = 1;
- if (xdaemon())
+ /*
+ * Just start daemonizing if not in test mode
+ */
+ fd = xdaemon_init();
+ if (fd == -1)
error("daemon(): %m");
log_set_timefmt(slurmctld_conf.log_fmt);
log_alter(log_opts, LOG_DAEMON,
@@ -318,6 +322,9 @@ int main(int argc, char **argv)
*/
_init_pidfile();
_become_slurm_user();
+ if (daemonize) {
+ xdaemon_finish(fd);
+ }
/*
* Create StateSaveLocation directory if necessary.
--
2.13.7