Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-1893

Fix bug in removeAcl in Bucket

    XMLWordPrintableJSON

Details

    • Done

    Description

      // 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;
       }

      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.
      }

      Attachments

        Issue Links

          Activity

            People

              bharat Bharat Viswanadham
              bharat Bharat Viswanadham
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h