From 265c52a0669fc26f7decd94be7c20001aba68ddf Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 6 Feb 2009 16:09:19 +0000
Subject: [PATCH] remove assoc_mgr_fill_in_assoc() handling of a uid=INFINITE
 to match the first association record and just use NO_VAL to match the
 account's association record

---
 src/common/assoc_mgr.c      | 8 +++-----
 src/common/assoc_mgr.h      | 1 -
 src/slurmctld/reservation.c | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c
index fd13d1c9337..a2a437a15a5 100644
--- a/src/common/assoc_mgr.c
+++ b/src/common/assoc_mgr.c
@@ -1,8 +1,8 @@
 /*****************************************************************************\
- *  assoc_mgr.h - keep track of local cache of accounting data.
+ *  accounting_storage_slurmdbd.c - accounting interface to slurmdbd.
  *****************************************************************************
  *  Copyright (C) 2004-2007 The Regents of the University of California.
- *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
+ *  Copyright (C) 2008 Lawrence Livermore National Security.
  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
  *  Written by Danny Auble <da@llnl.gov>
  *  
@@ -890,9 +890,7 @@ extern int assoc_mgr_fill_in_assoc(void *db_conn, acct_association_rec_t *assoc,
 			}
 			continue;
 		} else {
-			if(assoc->uid == (uint32_t)INFINITE) {
-				;	/* match any user id */
-			} else if(assoc->uid == (uint32_t)NO_VAL
+			if(assoc->uid == (uint32_t)NO_VAL
 			   && found_assoc->uid != (uint32_t)NO_VAL) {
 				debug3("we are looking for a "
 				       "nonuser association");
diff --git a/src/common/assoc_mgr.h b/src/common/assoc_mgr.h
index 8f43cf4ba55..fc86956716f 100644
--- a/src/common/assoc_mgr.h
+++ b/src/common/assoc_mgr.h
@@ -93,7 +93,6 @@ extern int assoc_mgr_fill_in_user(void *db_conn, acct_user_rec_t *user,
  * IN/OUT:  assoc - acct_association_rec_t with at least cluster and
  *		    account set for account association.  To get user
  *		    association set user, and optional partition.
- *		    Input a uid=INFINITE to match any user.
  *		    Sets "id" field with the association ID.
  * IN: enforce - return an error if no such association exists
  * IN/OUT: assoc_pptr - if non-NULL then return a pointer to the 
diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c
index d2aa8339572..f6fbd277ba8 100644
--- a/src/slurmctld/reservation.c
+++ b/src/slurmctld/reservation.c
@@ -279,7 +279,7 @@ static bool _is_account_valid(char *account)
 		return true;	/* don't worry about account validity */
 
 	memset(&assoc_rec, 0, sizeof(acct_association_rec_t));
-	assoc_rec.uid       = INFINITE;
+	assoc_rec.uid       = NO_VAL;
 	assoc_rec.acct      = account;
 
 	if (assoc_mgr_fill_in_assoc(acct_db_conn, &assoc_rec,
-- 
GitLab