From 85dc6a022d487156114e629308498b2913d26d00 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 27 Sep 2004 21:05:33 +0000 Subject: [PATCH] Change a variable name and some comments for greater clarity. --- src/slurmctld/partition_mgr.c | 8 ++++---- src/slurmctld/slurmctld.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index ab597641df3..8a58c601a0c 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -826,22 +826,22 @@ int update_part(update_part_msg_t * part_desc) * validate_group - validate that the submit uid is authorized to run in * this partition * IN part_ptr - pointer to a partition - * IN submit_uid - user submitting the job + * IN run_uid - user to run the job as * RET 1 if permitted to run, 0 otherwise */ -int validate_group(struct part_record *part_ptr, uid_t submit_uid) +extern int validate_group(struct part_record *part_ptr, uid_t run_uid) { int i; if (part_ptr->allow_groups == NULL) return 1; /* all users allowed */ - if ((submit_uid == 0) || (submit_uid == getuid())) + if ((run_uid == 0) || (run_uid == getuid())) return 1; /* super-user can run anywhere */ if (part_ptr->allow_uids == NULL) return 0; /* no non-super-users in the list */ for (i = 0; part_ptr->allow_uids[i]; i++) { - if (part_ptr->allow_uids[i] == submit_uid) + if (part_ptr->allow_uids[i] == run_uid) return 1; } return 0; /* not in this group's list */ diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 4204db44026..720dc1a21d4 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -1093,10 +1093,10 @@ extern int update_part (update_part_msg_t * part_desc ); * validate_group - validate that the submit uid is authorized to run in * this partition * IN part_ptr - pointer to a partition - * IN submit_uid - user submitting the job + * IN run_uid - user to run the job as * RET 1 if permitted to run, 0 otherwise */ -extern int validate_group (struct part_record *part_ptr, uid_t submit_uid); +extern int validate_group (struct part_record *part_ptr, uid_t run_uid); /* * validate_jobs_on_node - validate that any jobs that should be on the node -- GitLab