diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 19f4282a2fb34b649ed7acf2d85c6a38d472f915..c5a8f6d1ba489a35cf68b8ebf1aca3499ed846c4 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -13358,7 +13358,7 @@ extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid, #endif /* validate the request */ - if ((uid != 0) && (uid != getuid())) { + if (!validate_operator(uid)) { error("SECURITY VIOLATION: Attempt to suspend job from user %u", (int) uid); rc = ESLURM_ACCESS_DENIED; @@ -13435,7 +13435,7 @@ extern int job_suspend2(suspend_msg_t *sus_ptr, uid_t uid, } /* validate the request */ - if ((uid != 0) && (uid != getuid())) { + if (!validate_operator(uid)) { error("SECURITY VIOLATION: Attempt to suspend job from user %u", (int) uid); rc = ESLURM_ACCESS_DENIED;