Hello there!

    As uid_from_string() function does not checks its arguments it may
cause falling of slurmctld in rare case. See fix for that in attachment.

    Andriy.
diff -udpr slurm-2.2.3.plus3/src/common/assoc_mgr.c slurm-2.2.3.plus4/src/common/assoc_mgr.c
--- slurm-2.2.3.plus3/src/common/assoc_mgr.c	2011-02-14 19:29:35.000000000 +0200
+++ slurm-2.2.3.plus4/src/common/assoc_mgr.c	2011-05-16 17:36:40.000000000 +0300
@@ -2635,10 +2635,11 @@ extern int assoc_mgr_update_wckeys(slurm
 				//rc = SLURM_ERROR;
 				break;
 			}
-			if (uid_from_string (object->user, &pw_uid) < 0) {
+			if (object->user == NULL ||
+			    uid_from_string (object->user, &pw_uid) < 0) {
 				debug("wckey add couldn't get a uid "
 				      "for user %s",
-				      object->name);
+				      object->user);
 				object->uid = NO_VAL;
 			} else
 				object->uid = pw_uid;
@@ -2738,7 +2739,8 @@ extern int assoc_mgr_update_users(slurmd
 				//rc = SLURM_ERROR;
 				break;
 			}
-			if (uid_from_string (object->name, &pw_uid) < 0) {
+			if (object->name == NULL ||
+			    uid_from_string (object->name, &pw_uid) < 0) {
 				debug("user add couldn't get a uid for user %s",
 				      object->name);
 				object->uid = NO_VAL;

Reply via email to