You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Gautam Borad (JIRA)" <ji...@apache.org> on 2015/12/08 08:06:10 UTC
[jira] [Updated] (RANGER-773) Fix newly found Coverity scan issues
for Ranger KMS
[ https://issues.apache.org/jira/browse/RANGER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gautam Borad updated RANGER-773:
--------------------------------
Description:
Fix below given coverity scan issues in Ranger KMS - follow best practices and do not ignore return values and use separate synchronize blocks for data access.
was:
Fix below given coverity scan issues in Ranger KMS:
1. CID 133007: FindBugs: Bad practice (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
>/kms/src/main/java/org/apache/hadoop/crypto/key/Ranger2JKSUtil.java: 54 in org.apache.hadoop.crypto.key.Ranger2JKSUtil.main(java.lang.String[])()
________________________________________________________________________________________________________
2. CID 133007: FindBugs: Bad practice (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
/kms/src/main/java/org/apache/hadoop/crypto/key/Ranger2JKSUtil.java: 54 in org.apache.hadoop.crypto.key.Ranger2JKSUtil.main(java.lang.String[])()
System.exit(1) ;
}
else {
String keyStoreFileName = args[0] ;
File f = new File(keyStoreFileName) ;
if (! f.exists()) {
3. CID 133007: FindBugs: Bad practice (FB.RV_RETURN_VALUE_IGNORED_BAD_PRACTICE)
Exceptional return value of java.io.File.createNewFile() ignored.
f.createNewFile();
}
String keyStoreType = (args.length == 2 ? args[1] : DEFAULT_KEYSTORE_TYPE) ;
try {
KeyStore.getInstance(keyStoreType) ;
} catch (KeyStoreException e) {
________________________________________________________________________________________________________
4. CID 133003: Concurrent data access violations (GUARDED_BY_VIOLATION)
/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java: 184 in org.apache.hadoop.crypto.key.RangerKeyStore.engineDeleteEntry(java.lang.String)()
public void engineDeleteEntry(String alias)
throws KeyStoreException
{
synchronized(keyEntries) {
dbOperationDelete(convertAlias(alias));
keyEntries.remove(convertAlias(alias));
5. CID 133003: Concurrent data access violations (GUARDED_BY_VIOLATION)
Accessing "deltaEntries" without holding lock "RangerKeyStore.deltaEntries". Elsewhere, "org.apache.hadoop.crypto.key.RangerKeyStore.deltaEntries" is accessed with "RangerKeyStore.deltaEntries" held 5 out of 7 times.
deltaEntries.remove(convertAlias(alias));
}
}
> Fix newly found Coverity scan issues for Ranger KMS
> ---------------------------------------------------
>
> Key: RANGER-773
> URL: https://issues.apache.org/jira/browse/RANGER-773
> Project: Ranger
> Issue Type: Bug
> Components: admin, kms
> Affects Versions: 0.5.1, 0.6.0
> Reporter: Gautam Borad
> Assignee: Gautam Borad
> Fix For: 0.5.1, 0.6.0
>
>
> Fix below given coverity scan issues in Ranger KMS - follow best practices and do not ignore return values and use separate synchronize blocks for data access.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)