get_full_acl

in lib/instance_agent/plugins/codedeploy/install_instruction.rb [299:323]


        def get_full_acl()
          perm = "%o" % File.stat(@object).mode
          perm = perm[-3,3]
          @acl.add_ace(":#{perm[0]}")
          @acl.add_ace("g::#{perm[1]}")
          @acl.add_ace("o::#{perm[2]}")
          if @acl.has_base_named? && !@acl.has_base_mask?
            @acl.add_ace("m::#{perm[1]}")
          end
          if @acl.has_default?
            if !@acl.has_default_user?
              @acl.add_ace("d::#{perm[0]}")
            end
            if !@acl.has_default_group?
              @acl.add_ace("d:g::#{perm[1]}")
            end
            if !@acl.has_default_other?
              @acl.add_ace("d:o:#{perm[2]}")
            end
            if @acl.has_default_named? && !@acl.has_default_mask?
              @acl.add_ace(@acl.get_default_group_ace.sub("group:","mask"))
            end
          end
        end