hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ding Yuan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-10269) SaslException is completely ignored
Date Thu, 23 Jan 2014 11:44:38 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-10269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ding Yuan updated HADOOP-10269:
-------------------------------

    Description: 
In "org/apache/hadoop/security/SaslOutputStream.java", there is the following code pattern:

{noformat}
172    try {
173      if (saslServer != null) { // using saslServer
174        saslToken = saslServer.wrap(inBuf, off, len);
175      } else { // using saslClient
176        saslToken = saslClient.wrap(inBuf, off, len);
177      }
178    } catch (SaslException se) {
179      try {
180       disposeSasl();
181      } catch (SaslException ignored) {
182      }
183      throw se;
184    }
{noformat}

On line 181, the exception thrown by disposeSasl(), which can be from SaslServer.dispose()
or SaslClient.dispose(), is ignored completely without even logging it. Maybe at least log
it?

Ding

  was:
In "org/apache/hadoop/security/SaslOutputStream.java", there is the following code pattern:

172    try {
173      if (saslServer != null) { // using saslServer
174        saslToken = saslServer.wrap(inBuf, off, len);
175      } else { // using saslClient
176        saslToken = saslClient.wrap(inBuf, off, len);
177      }
178    } catch (SaslException se) {
179      try {
180       disposeSasl();
181      } catch (SaslException ignored) {
182      }
183      throw se;
184    }

On line 181, the exception thrown by disposeSasl(), which can be from SaslServer.dispose()
or SaslClient.dispose(), is ignored completely without even logging it. Maybe at least log
it?

Ding


> SaslException is completely ignored
> -----------------------------------
>
>                 Key: HADOOP-10269
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10269
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.2.0
>            Reporter: Ding Yuan
>
> In "org/apache/hadoop/security/SaslOutputStream.java", there is the following code pattern:
> {noformat}
> 172    try {
> 173      if (saslServer != null) { // using saslServer
> 174        saslToken = saslServer.wrap(inBuf, off, len);
> 175      } else { // using saslClient
> 176        saslToken = saslClient.wrap(inBuf, off, len);
> 177      }
> 178    } catch (SaslException se) {
> 179      try {
> 180       disposeSasl();
> 181      } catch (SaslException ignored) {
> 182      }
> 183      throw se;
> 184    }
> {noformat}
> On line 181, the exception thrown by disposeSasl(), which can be from SaslServer.dispose()
or SaslClient.dispose(), is ignored completely without even logging it. Maybe at least log
it?
> Ding



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message