mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-234: Fix style, debug messages, and logger output.
This commit is contained in:
@@ -197,7 +197,7 @@ public class LDAPConnectionService {
|
||||
* If an error occurs parsing out the LdapUrl object or the
|
||||
* maximum number of referral hops is reached.
|
||||
*/
|
||||
public LdapNetworkConnection referralConnection(LdapUrl referralUrl,
|
||||
public LdapNetworkConnection getReferralConnection(LdapUrl referralUrl,
|
||||
LdapConnectionConfig ldapConfig, int hop)
|
||||
throws GuacamoleException {
|
||||
|
||||
|
@@ -171,7 +171,8 @@ public class ObjectQueryService {
|
||||
* The LDAP query to execute.
|
||||
*
|
||||
* @param searchHop
|
||||
* The level of depth for this search, used for tracking referrals.
|
||||
* The current level of referral depth for this search, used for
|
||||
* limiting the maximum depth to which referrals can go.
|
||||
*
|
||||
* @return
|
||||
* A list of all results accessible to the user currently bound under
|
||||
@@ -209,9 +210,13 @@ public class ObjectQueryService {
|
||||
|
||||
Referral referral = results.getReferral();
|
||||
for (String url : referral.getLdapUrls()) {
|
||||
LdapNetworkConnection referralConnection = ldapService.referralConnection(
|
||||
new LdapUrl(url), ldapConnectionConfig, searchHop++);
|
||||
entries.addAll(search(referralConnection, baseDN, query, searchHop));
|
||||
LdapNetworkConnection referralConnection =
|
||||
ldapService.getReferralConnection(
|
||||
new LdapUrl(url),
|
||||
ldapConnectionConfig, searchHop++
|
||||
);
|
||||
entries.addAll(search(referralConnection, baseDN, query,
|
||||
searchHop));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -115,7 +115,7 @@ public class ConnectionService {
|
||||
// getConnections() will only be called after a connection has been
|
||||
// authenticated (via non-anonymous bind), thus userDN cannot
|
||||
// possibly be null
|
||||
assert (userDN != null);
|
||||
assert(userDN != null);
|
||||
|
||||
// Get the search filter for finding connections accessible by the
|
||||
// current user
|
||||
@@ -145,7 +145,9 @@ public class ConnectionService {
|
||||
cnName = cn.getString();
|
||||
}
|
||||
catch (LdapInvalidAttributeValueException e) {
|
||||
logger.error("Invalid value for CN attribute.", e.getMessage());
|
||||
logger.error("Invalid value for CN attribute: {}",
|
||||
e.getMessage());
|
||||
logger.debug("LDAP exception while getting CN attribute.", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -164,7 +166,9 @@ public class ConnectionService {
|
||||
config.setProtocol(protocol.getString());
|
||||
}
|
||||
catch (LdapInvalidAttributeValueException e) {
|
||||
logger.error("Invalid value of the protocol entry.", e.getMessage());
|
||||
logger.error("Invalid value of the protocol entry: {}",
|
||||
e.getMessage());
|
||||
logger.debug("LDAP exception when getting protocol value.", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -179,7 +183,10 @@ public class ConnectionService {
|
||||
parameter = parameterAttribute.getString();
|
||||
}
|
||||
catch (LdapInvalidAttributeValueException e) {
|
||||
logger.warn("Parameter value not valid for {}", cnName, e);
|
||||
logger.warn("Parameter value not valid for {}: {}",
|
||||
cnName, e.getMessage());
|
||||
logger.debug("LDAP exception when getting parameter value.",
|
||||
e);
|
||||
return null;
|
||||
}
|
||||
parameterAttribute.remove(parameter);
|
||||
|
@@ -228,7 +228,9 @@ public class UserGroupService {
|
||||
+ "and will be ignored.", entry.getDn().toString());
|
||||
}
|
||||
catch (LdapInvalidAttributeValueException e) {
|
||||
logger.debug("User group missing identifier.", e.getMessage());
|
||||
logger.error("User group missing identifier: {}",
|
||||
e.getMessage());
|
||||
logger.debug("LDAP exception while getting group identifier.", e);
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user