Skip to content
Snippets Groups Projects
Commit 7c969dd2 authored by Moe Jette's avatar Moe Jette
Browse files
parent 467a2078
No related branches found
No related tags found
No related merge requests found
......@@ -309,7 +309,7 @@ documents those changes that are of interest to users and admins.
- Set supplimental groups for SlurmUser in slurmctld daemon, from
Anne Marie Wunderlin, Bull.
- In jobcomp/script: Add ACCOUNT and PROCS (count) to enviromnemt
variables set. Fix bug that prevented UPD and JOBID from being
variables set. Fix bug that prevented UID and JOBID from being
overwritten.
* Changes in SLURM 1.1.34
......
......@@ -101,7 +101,7 @@ static void _close_fd(void)
* event_notify - Notify Moab of some event
* event_code IN - message code to send Moab
* 1234 - job state change
* TBD - partition state change
* 1235 - partition state change
* desc IN - event description
* RET 0 on success, -1 on failure
*/
......@@ -116,15 +116,15 @@ extern int event_notify(int event_code, char *desc)
return 0;
}
if (event_code == 1234) {
if (event_code == 1234) { /* job change */
if (job_aggregation_time
&& (difftime(now, last_notify_time) < job_aggregation_time)) {
debug("wiki event notification already sent recently");
return 0;
}
event_msg = "1234\0";
} else if (event_code == 5) { /* actual value TBD */
event_msg = "5\0"; /* actual value TBD */
event_msg = "1234";
} else if (event_code == 1235) { /* configuration change */
event_msg = "1235";
} else {
error("event_notify: invalid event code: %d", event_code);
return -1;
......
......@@ -199,12 +199,15 @@ int main(int argc, char *argv[])
_init_pidfile();
/* Initialize supplementary group ID list for SlurmUser */
if (initgroups(slurmctld_conf.slurm_user_name,
gid_from_string(slurmctld_conf.slurm_user_name)))
if ((getuid() == 0)
&& (slurmctld_conf.slurm_user_id != getuid())
&& initgroups(slurmctld_conf.slurm_user_name,
gid_from_string(slurmctld_conf.slurm_user_name))) {
error("initgroups: %m");
}
if ((slurmctld_conf.slurm_user_id != getuid()) &&
(setuid(slurmctld_conf.slurm_user_id))) {
if ((slurmctld_conf.slurm_user_id != getuid())
&& (setuid(slurmctld_conf.slurm_user_id))) {
fatal("Can not set uid to SlurmUser(%d): %m",
slurmctld_conf.slurm_user_id);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment