Description: Do not continue with job launch if --uid fails
  When srun is invoked with the --uid option to impersonate another
  user, if becoming such user fails, then a warning is printed and the
  job is run as root. This behaviour can be exploited.
  This patch will stop processing in case becaming the user fails.
  Fix CVE-2019-19728
Author: Harald Barth <haba@kth.se>
Origin: https://github.com/SchedMD/slurm/commit/5ac031b2ef5462f6e8e47dad0247bd474614c118
Date: 2019-12-18

--- a/src/srun/libsrun/srun_job.c
+++ b/src/srun/libsrun/srun_job.c
@@ -1286,7 +1286,7 @@ extern void create_srun_job(void **p_job, bool *got_alloc,
 		 *  Become --uid user
 		 */
 		if (_become_user () < 0)
-			info("Warning: Unable to assume uid=%u", opt.uid);
+			fatal("Unable to assume uid=%u", opt.uid);
 		if (_create_job_step(job, true, srun_job_list, pack_jobid,
 				     pack_nodelist) < 0) {
 			slurm_complete_job(my_job_id, 1);
@@ -1312,7 +1312,7 @@ extern void create_srun_job(void **p_job, bool *got_alloc,
 	 *  Become --uid user
 	 */
 	if (_become_user () < 0)
-		info("Warning: Unable to assume uid=%u", opt.uid);
+		fatal("Unable to assume uid=%u", opt.uid);
 
 	if (!slurm_started) {
 		/*
