Hi All,

We've a situation where the majority of our users have a                        
                
mapping that we can retrieve via LDAP. This works just fine.                    
                
                                                                                
                
However we have a number of users that we can't get a                           
                
Bugzilla <-> svn username mapping from LDAP. For these                          
                
users, we've defined the explicit mappings in daemon.conf                       
                
under the "mapping_values" section.                                             
                
                                                                                
                
What i found was that if an error is raised in the username                     
                
lookup in the AD section of the code, a successful lookup                       
                
via mapping_values didn't reset the error code, resulting                       
                
in a failure to lookup the username mapping.                                    
                
                                                                                
                
So i've put together a little patch that resets the error                       
                
condition if the user is successfully looked up via                             
                
mapping_values.                                                                 
                
                                                                                
                
Please find the patch attached....                                              
                


Stuart
--- SCMBUG_RELEASE_0-26-13.orig/src/lib/product/Daemon/Process.pm.in	2009-01-26 05:13:44.000000000 +0000
+++ SCMBUG_RELEASE_0-26-13/src/lib/product/Daemon/Process.pm.in	2009-05-29 14:35:47.000000000 +0100
@@ -673,6 +674,7 @@
 	    # mapping_regexes
 	    if ( defined ( $self->daemon_configuration()->{ userlist }->{ mappings }->{ mapping_values }->{ values }->{ $request->{ username } } ) ) {
 		$request->{ translated_username } = $self->daemon_configuration()->{ userlist }->{ mappings }->{ mapping_values }->{ values }->{ $request->{ username } };
+		$ret_val = 0;
 	    }
 	}
 	
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to