From f6ca29f836b17d4bb59b9366de4df68c26fa21b9 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Tue, 14 Apr 2009 22:12:55 +0000
Subject: [PATCH] more fixes to documentation

---
 doc/man/man5/slurm.conf.5    |  9 ++++++---
 doc/man/man5/slurmdbd.conf.5 | 12 ++++++++----
 src/common/read_config.c     | 10 +++++-----
 src/slurmdbd/read_config.c   | 14 +++++++-------
 4 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5
index c11cf6e014d..21bed0587e3 100644
--- a/doc/man/man5/slurm.conf.5
+++ b/doc/man/man5/slurm.conf.5
@@ -843,6 +843,12 @@ prevents users from viewing node state information.
 \fBpartitions\fR 
 prevents users from viewing partition state information.
 .TP
+\fBreservations\fR 
+prevents regular users from viewing reservations.
+.TP
+\fBusage\fR 
+(NON-SLURMDBD ACCOUNTING ONLY) prevents users from viewing 
+usage of any other user.  This applys to sreport.
 \fBusers\fR 
 (NON-SLURMDBD ACCOUNTING ONLY) prevents users from viewing 
 information of any user other than themselves, this also makes it so users can 
@@ -850,9 +856,6 @@ only see associations they deal with.
 Coordinators can see associations of all users they are coordinator of, 
 but can only see themselves when listing users.
 .TP
-\fBusage\fR 
-(NON-SLURMDBD ACCOUNTING ONLY) prevents users from viewing 
-usage of any other user.  This applys to sreport.
 .RE
 
 
diff --git a/doc/man/man5/slurmdbd.conf.5 b/doc/man/man5/slurmdbd.conf.5
index 1dd295cdc4a..29ae872f8f5 100644
--- a/doc/man/man5/slurmdbd.conf.5
+++ b/doc/man/man5/slurmdbd.conf.5
@@ -171,16 +171,20 @@ prevents users from viewing job records belonging
 to other users unless they are coordinators of the association running the job
 when using sacct.
 .TP
+\fBreservations\fR 
+restricts getting reservation information to users with operator status 
+and above.
+.TP
+\fBusage\fR  
+prevents users from viewing usage of any other user.  
+This applys to sreport.
+.TP
 \fBusers\fR  
 prevents users from viewing information of any user 
 other than themselves, this also makes it so users can only see 
 associations they deal with.  
 Coordinators can see associations of all users they are coordinator of, 
 but can only see themselves when listing users.
-.TP
-\fBusage\fR  
-prevents users from viewing usage of any other user.  
-This applys to sreport.
 .RE
 
 .TP
diff --git a/src/common/read_config.c b/src/common/read_config.c
index c27b09a62f5..1e105dd361f 100644
--- a/src/common/read_config.c
+++ b/src/common/read_config.c
@@ -2048,20 +2048,20 @@ validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl)
 		fatal("proctrack/linuxproc is incompatable with switch/elan");
 
 	if (s_p_get_string(&temp_str, "PrivateData", hashtbl)) {
+		if (strstr(temp_str, "account"))
+			conf->private_data |= PRIVATE_DATA_ACCOUNTS;
 		if (strstr(temp_str, "job"))
 			conf->private_data |= PRIVATE_DATA_JOBS;
 		if (strstr(temp_str, "node"))
 			conf->private_data |= PRIVATE_DATA_NODES;
 		if (strstr(temp_str, "partition"))
 			conf->private_data |= PRIVATE_DATA_PARTITIONS;
+		if (strstr(temp_str, "reservation"))
+			conf->private_data |= PRIVATE_DATA_RESERVATIONS;
 		if (strstr(temp_str, "usage"))
 			conf->private_data |= PRIVATE_DATA_USAGE;
-		if (strstr(temp_str, "users"))
+		if (strstr(temp_str, "user"))
 			conf->private_data |= PRIVATE_DATA_USERS;
-		if (strstr(temp_str, "accounts"))
-			conf->private_data |= PRIVATE_DATA_ACCOUNTS;
-		if (strstr(temp_str, "reservations"))
-			conf->private_data |= PRIVATE_DATA_RESERVATIONS;
 		if (strstr(temp_str, "all"))
 			conf->private_data = 0xffff;
 		xfree(temp_str);
diff --git a/src/slurmdbd/read_config.c b/src/slurmdbd/read_config.c
index 01da664f12c..df0fbb57dc9 100644
--- a/src/slurmdbd/read_config.c
+++ b/src/slurmdbd/read_config.c
@@ -209,6 +209,9 @@ extern int read_slurmdbd_conf(void)
 		s_p_get_string(&slurmdbd_conf->pid_file, "PidFile", tbl);
 		s_p_get_string(&slurmdbd_conf->plugindir, "PluginDir", tbl);
 		if (s_p_get_string(&temp_str, "PrivateData", tbl)) {
+			if (strstr(temp_str, "account"))
+				slurmdbd_conf->private_data 
+					|= PRIVATE_DATA_ACCOUNTS;
 			if (strstr(temp_str, "job"))
 				slurmdbd_conf->private_data 
 					|= PRIVATE_DATA_JOBS;
@@ -218,18 +221,15 @@ extern int read_slurmdbd_conf(void)
 			if (strstr(temp_str, "partition"))
 				slurmdbd_conf->private_data 
 					|= PRIVATE_DATA_PARTITIONS;
+			if (strstr(temp_str, "reservation"))
+				slurmdbd_conf->private_data
+					|= PRIVATE_DATA_RESERVATIONS;
 			if (strstr(temp_str, "usage"))
 				slurmdbd_conf->private_data
 					|= PRIVATE_DATA_USAGE;
-			if (strstr(temp_str, "users"))
+			if (strstr(temp_str, "user"))
 				slurmdbd_conf->private_data 
 					|= PRIVATE_DATA_USERS;
-			if (strstr(temp_str, "accounts"))
-				slurmdbd_conf->private_data 
-					|= PRIVATE_DATA_ACCOUNTS;
-			if (strstr(temp_str, "reservations"))
-				slurmdbd_conf->private_data
-					|= PRIVATE_DATA_RESERVATIONS;
 			if (strstr(temp_str, "all"))
 				slurmdbd_conf->private_data = 0xffff;
 			xfree(temp_str);
-- 
GitLab