Sharad Mishra has posted comments on this change.

Change subject: tools: Don't ask for password, before DNS SRV records are 
returned.
......................................................................


Patch Set 6: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/JndiAction.java
Line 31:     private String userName;
Line 32:     private final String domainName;
Line 33:     private final LdapProviderType ldapProviderType;
Line 34:     private final StringBuffer userGuid;
Line 35:     private DnsSRVResult ldapDnsResult;
make it private final DnsSRVResult
Line 36:     private final static Logger log = 
Logger.getLogger(JndiAction.class);
Line 37: 
Line 38:     public JndiAction(String userName, String domainName, StringBuffer 
userGuid, LdapProviderType ldapProviderType, DnsSRVResult ldapDnsResult) {
Line 39:         this.userName = userName;


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/ManageDomains.java
Line 229:         boolean foundServers = true;
Line 230:         try
Line 231:         {
Line 232:             result = locator.getKdc(DnsSRVLocator.TCP, domainName);
Line 233:             if (result.getNumOfValidAddresses() == 0) {
wouldn't this result in an NPE.
Can we instead just check -
if ((result == null) && (result.getNumOfValidAddresses() == 0)) {
Line 234:                 result = locator.getKdc(DnsSRVLocator.UDP,domainName);
Line 235:                 if (result.getNumOfValidAddresses() == 0) {
Line 236:                     foundServers =false;
Line 237:                 }


Line 231:         {
Line 232:             result = locator.getKdc(DnsSRVLocator.TCP, domainName);
Line 233:             if (result.getNumOfValidAddresses() == 0) {
Line 234:                 result = locator.getKdc(DnsSRVLocator.UDP,domainName);
Line 235:                 if (result.getNumOfValidAddresses() == 0) {
same here
Line 236:                     foundServers =false;
Line 237:                 }
Line 238:             }
Line 239:         } catch (Exception ex) {


Line 250:         LdapSRVLocator locator = new LdapSRVLocator();
Line 251:         DnsSRVResult ldapDnsResult = null;
Line 252:         boolean foundServers = true;
Line 253:         try {
Line 254:             ldapDnsResult = locator.getLdapServers(domainName);
same here, except we can ignore the 'getNumOfValidAddresses()' check and just 
verify that ldapDnsResult is non-null.
Line 255:             if (ldapDnsResult.getNumOfValidAddresses() == 0) {
Line 256:                 foundServers = false;
Line 257:             }
Line 258:         } catch (Exception ex) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c5132300eb1f1fd94f771cab17efe5246dbeca8
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to