hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharat Viswanadham (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDDS-1893) Fix bug in removeAcl in Bucket
Date Fri, 02 Aug 2019 00:51:00 GMT
Bharat Viswanadham created HDDS-1893:
----------------------------------------

             Summary: Fix bug in removeAcl in Bucket
                 Key: HDDS-1893
                 URL: https://issues.apache.org/jira/browse/HDDS-1893
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
            Reporter: Bharat Viswanadham
            Assignee: Bharat Viswanadham


{code:java}
// When we are removing subset of rights from existing acl.
for(OzoneAcl a: bucketInfo.getAcls()) {
 if(a.getName().equals(acl.getName()) &&
 a.getType().equals(acl.getType())) {
 BitSet bits = (BitSet) acl.getAclBitSet().clone();
 bits.and(a.getAclBitSet());

 if (bits.equals(ZERO_BITSET)) {
 return false;
 }
 bits = (BitSet) acl.getAclBitSet().clone();
 bits.and(a.getAclBitSet());
 a.getAclBitSet().xor(bits);

 if(a.getAclBitSet().equals(ZERO_BITSET)) {
 bucketInfo.getAcls().remove(a);
 }
 break;
 } else {
 return false;
 }{code}
In for loop, if first one is not matching with name and type, in else we return false. We
should iterate entire acl list and then return response.
}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message