Class: LibACL::Entry
- Inherits:
-
NiceFFI::OpaqueStruct
- Object
- NiceFFI::OpaqueStruct
- LibACL::Entry
- Defined in:
- lib/libacl.rb
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #permset ⇒ Object
- #qualifier ⇒ Object
-
#replace(source) ⇒ Object
replace this entry with source.
-
#tag_type ⇒ Object
def permset=.
- #to_s ⇒ Object
Class Method Details
.release(ptr) ⇒ Object
188 189 190 |
# File 'lib/libacl.rb', line 188 def self.release(ptr) acl_free(ptr) end |
Instance Method Details
#==(other) ⇒ Object
226 227 228 229 230 |
# File 'lib/libacl.rb', line 226 def == (other) permset == other.permset and tag_type == other.tag_type and qualifier == other.qualifier end |
#permset ⇒ Object
198 199 200 201 202 203 |
# File 'lib/libacl.rb', line 198 def permset ptr = FFI::MemoryPointer.new :pointer ret = LibACL::acl_get_permset(self, ptr) raise "Error" if ret!=0 Permset.new ptr.read_pointer end |
#qualifier ⇒ Object
217 218 219 220 221 222 223 224 |
# File 'lib/libacl.rb', line 217 def qualifier ptr = LibACL::acl_get_qualifier(self) if ptr.null? return nil else return ptr.read_int end end |
#replace(source) ⇒ Object
replace this entry with source
193 194 195 |
# File 'lib/libacl.rb', line 193 def replace(source) LibACL::acl_copy_entry(self,source) end |
#tag_type ⇒ Object
def permset=
end
209 210 211 212 213 214 215 |
# File 'lib/libacl.rb', line 209 def tag_type type= LibACL::find_type(:acl_tag) ptr = FFI::MemoryPointer.new type ret = LibACL::acl_get_tag_type(self, ptr) raise "Error" if ret !=0 type[ptr.read_int] end |
#to_s ⇒ Object
232 233 234 235 |
# File 'lib/libacl.rb', line 232 def to_s # tag=tag_type.to_s.sub("_obj","") "#{tag_type}:#{qualifier}:#{permset}" end |