Bug 3894 - gss_assist_map_local_user() cannot handle multiple local usernames
: gss_assist_map_local_user() cannot handle multiple local usernames
Status: RESOLVED FIXED
: GSI C
Authentication
: unspecified
: Macintosh All
: P3 normal
: 4.0.6
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-11-08 11:34 by
Modified: 2008-08-11 15:22 (History)


Attachments
path to gridmap.c (588 bytes, patch)
2005-11-08 11:36, Olle Mulmo
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-11-08 11:34:42
A patch is provided to gss_assist:gridmap.c that checks all local userids for
the DN in question.

The functionality gss_assist_map_local_user() is used, among other things, by
the online CA code in myproxy. I have a deployment scenario that calls for
multiple myproxy usernames being mapped to the same DN, depending on the
authentication mechanism used. For example,

"/O=Grid/O=Foo/CN=Olle Mulmo" mulmo,olle@SOMEWHERE

NOTE: I'm not 100% sure this bug should be fixed (topic for discussion), but a
patch is provided in the meanwhile.

/Olle
------- Comment #1 From 2005-11-08 11:36:14 -------
Created an attachment (id=740) [details]
path to gridmap.c

Sorry if my editor screwed tabs up a bit.
------- Comment #2 From 2005-11-08 11:53:03 -------
(From update of attachment 740 [details])
--- gridmap.c.~1.19.~	Sat Apr 16 02:08:42 2005
+++ gridmap.c	Tue Nov  8 18:43:43 2005
@@ -715,13 +715,18 @@
	    continue;
	}

-	if((gline_tmp->user_ids != NULL) &&
-	    (gline_tmp->user_ids[0] != NULL) &&
-	    (strcmp(local_user, gline_tmp->user_ids[0]) == 0))
-	{
-	    found = 1;
-	}
-	else
+	if (gline_tmp->user_ids)
+	  {
+		int i=0;
+		while (!found && gline_tmp->user_ids[i])
+		  {
+			if (strcmp(local_user, gline_tmp->user_ids[i++]) == 0)
+			  {
+				found = 1;
+			  }
+		  }
+	  }
+	if (!found)
	{
	    globus_i_gss_assist_gridmap_line_free(gline_tmp);
	}
------- Comment #3 From 2007-12-11 17:03:59 -------
Similar functionality was added to gsi when fixing bug 5457