Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B900510603 for ; Thu, 23 Jan 2014 11:44:42 +0000 (UTC) Received: (qmail 14730 invoked by uid 500); 23 Jan 2014 11:44:41 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 14266 invoked by uid 500); 23 Jan 2014 11:44:39 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 14253 invoked by uid 99); 23 Jan 2014 11:44:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 11:44:38 +0000 Date: Thu, 23 Jan 2014 11:44:38 +0000 (UTC) From: "Ding Yuan (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-10269) SaslException is completely ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)