-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: running job's from user and with started SLURM from non-root user
- Loading branch information
Showing
3 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c | ||
index c7eeb29..cd2a528 100644 | ||
--- a/src/slurmd/slurmstepd/mgr.c | ||
+++ b/src/slurmd/slurmstepd/mgr.c | ||
@@ -2411,8 +2411,8 @@ _drop_privileges(stepd_step_rec_t *job, bool do_setuid, | ||
/* | ||
* No need to drop privileges if we're not running as root | ||
*/ | ||
- if (getuid() != (uid_t) 0) | ||
- return SLURM_SUCCESS; | ||
+ //if (getuid() != (uid_t) 0) | ||
+ // return SLURM_SUCCESS; | ||
|
||
if (setegid(job->gid) < 0) { | ||
error("setegid: %m"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
. ./slxc.conf | ||
|
||
CAPLIST="cap_chown,cap_setgid,cap_setuid,cap_fowner+ep" | ||
|
||
setcap $CAPLIST $SLURM_PATH/sbin/slurmstepd | ||
getcap $SLURM_PATH/sbin/slurmstepd |