diff --git a/src/sacctmgr/sacctmgr.c b/src/sacctmgr/sacctmgr.c index de735be789b3c45448d1568d63ae183a8d534e90..8296ac307681c499e02c959af005e10211b2f712 100644 --- a/src/sacctmgr/sacctmgr.c +++ b/src/sacctmgr/sacctmgr.c @@ -608,7 +608,7 @@ static void _show_it (int argc, char *argv[]) } else if (strncasecmp (argv[0], "Configuration", MAX(command_len, 1)) == 0) { error_code = sacctmgr_list_config(true); - } else if (strncasecmp (argv[0], "Problem", + } else if (strncasecmp (argv[0], "Problems", MAX(command_len, 1)) == 0) { error_code = sacctmgr_list_problem((argc - 1), &argv[1]); } else if (strncasecmp (argv[0], "QOS", MAX(command_len, 1)) == 0) { @@ -625,9 +625,10 @@ static void _show_it (int argc, char *argv[]) exit_code = 1; fprintf(stderr, "No valid entity in list command\n"); fprintf(stderr, "Input line must include "); - fprintf(stderr, "\"Account\", \"Association\", "); - fprintf(stderr, "\"Cluster\", \"Problem\", \"QOS\", "); - fprintf(stderr, "\"Transaction\", \"User\", or \"WCKey\"\n"); + fprintf(stderr, "\"Account\", \"Association\", " + "\"Configuration\"\n\"Cluster\", \"Problem\", " + "\"QOS\", \"Transaction\", \"User\", " + "or \"WCKey\"\n"); } if (error_code == SLURM_ERROR) { diff --git a/src/slurmdbd/proc_req.c b/src/slurmdbd/proc_req.c index 166c1bd584f031b1f75021f3852b5e16fa0cf07c..115dbd88f5f9fed001c6164ad3da965caafbae1d 100644 --- a/src/slurmdbd/proc_req.c +++ b/src/slurmdbd/proc_req.c @@ -1236,6 +1236,19 @@ static int _get_probs(slurmdbd_conn_t *slurmdbd_conn, char *comment = NULL; debug2("DBD_GET_PROBS: called"); + + if((*uid != slurmdbd_conf->slurm_user_id && *uid != 0) + && assoc_mgr_get_admin_level(slurmdbd_conn->db_conn, *uid) + < ACCT_ADMIN_OPERATOR) { + comment = "Your user doesn't have privilege to preform this action"; + error("%s", comment); + *out_buffer = make_dbd_rc_msg(slurmdbd_conn->rpc_version, + ESLURM_ACCESS_DENIED, + comment, DBD_GET_PROBS); + + return ESLURM_ACCESS_DENIED; + } + if (slurmdbd_unpack_cond_msg(slurmdbd_conn->rpc_version, DBD_GET_PROBS, &get_msg, in_buffer) != SLURM_SUCCESS) {