Tomáš Došek has posted comments on this change.

Change subject: engine: Fix for BZ#967890 - enhance logging of JndiAction level 
in dEBUG mode
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/JndiAction.java
Line 103:                     // Run the LDAP query to get the user
Line 104:                     ctx = new InitialDirContext(env);
Line 105:                     NamingEnumeration<SearchResult> answer = 
executeQuery(ctx, controls, prepareQuery());
Line 106: 
Line 107:                     while (answer.hasMoreElements()) {
This while loop is not necessary and should get replaced by:

if (answer.hasMoreElements()) {
    String guid = guidFromResults(answer.next());
    if (guid != null) {   
         userGuid.append(guid);
         logQueryContext(userGuid.toString(), uri.toString(), 
currentLdapServer);
         return AuthenticationResult.OK;
    }
}

Separate bug #968958 was filed for this and I'll tackle it once the logging 
change gets merged.
Line 108:                         // Print the objectGUID for the user as well 
as URI and query path
Line 109:                         String guid = guidFromResults(answer.next());
Line 110:                         if (guid == null) {
Line 111:                             break;


Line 257:         RootDSEData rootDSEData = new RootDSEData(ctx);
Line 258:         return rootDSEData.getDomainDN();
Line 259:     }
Line 260:     
Line 261:     private void logQueryContext(String actualUserGuid, String 
actualUri, String actualCurrentLdapServer) {
To avoid code duplication I created general logging function that will serve 
for logging of the query context
Line 262:         // Log all information about query used for authentication
Line 263:         log.debug("User guid is: " + actualUserGuid);
Line 264:         log.debug("URI is: " + actualUri);
Line 265:         log.debug("Complete query path is: " + 
actualCurrentLdapServer);


--
To view, visit http://gerrit.ovirt.org/15176
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I84525767c98eda9eba522dc5518c02c10c55fbfa
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomáš Došek <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Tomáš Došek <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to