Skip to content
Snippets Groups Projects
Commit 11952c2f authored by Moe Jette's avatar Moe Jette
Browse files

Correct logic for authentication of srun --attach processing in slurmd.

parent a345e424
No related branches found
No related tags found
No related merge requests found
......@@ -1057,6 +1057,7 @@ _rpc_reattach_tasks(slurm_msg_t *msg, slurm_addr *cli)
goto done2;
}
req_uid = g_slurm_auth_get_uid(msg->cred);
if ((req_uid != step->uid) && (!_slurm_authorized_user(req_uid))) {
error("uid %ld attempt to attach to job %u.%u owned by %ld",
(long) req_uid, req->job_id, req->job_step_id,
......
......@@ -621,7 +621,7 @@ _handle_attach(int fd, slurmd_job_t *job, uid_t uid)
goto done;
}
if (!_slurm_authorized_user(uid)) {
if ((uid != job->uid) && !_slurm_authorized_user(uid)) {
error("uid %ld attempt to attach to job %u.%u owned by %ld",
(long) uid, job->jobid, job->stepid, (long)job->uid);
rc = EPERM;
......
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