class Chef::ReservedNames::Win32::Security::SecurityDescriptor

Attributes

pointer[R]

Public Class Methods

new(pointer) click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 28
def initialize(pointer)
  @pointer = pointer
end

Public Instance Methods

absolute?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 34
def absolute?
  !self_relative?
end
control() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 38
def control
  control, version = Chef::ReservedNames::Win32::Security.get_security_descriptor_control(self)
  control
end
dacl() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 43
def dacl
  raise "DACL not present" if !dacl_present?
  present, acl, defaulted = Chef::ReservedNames::Win32::Security.get_security_descriptor_dacl(self)
  acl
end
dacl_inherits?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 49
def dacl_inherits?
  (control & Chef::ReservedNames::Win32::API::Security::SE_DACL_PROTECTED) == 0
end
dacl_present?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 53
def dacl_present?
  (control & Chef::ReservedNames::Win32::API::Security::SE_DACL_PRESENT) != 0
end
group() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 57
def group
  result, defaulted = Chef::ReservedNames::Win32::Security.get_security_descriptor_group(self)
  result
end
owner() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 62
def owner
  result, defaulted = Chef::ReservedNames::Win32::Security.get_security_descriptor_owner(self)
  result
end
sacl() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 67
def sacl
  raise "SACL not present" if !sacl_present?
  Security.with_privileges("SeSecurityPrivilege") do
    present, acl, defaulted = Chef::ReservedNames::Win32::Security.get_security_descriptor_sacl(self)
    acl
  end
end
sacl_inherits?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 75
def sacl_inherits?
  (control & Chef::ReservedNames::Win32::API::Security::SE_SACL_PROTECTED) == 0
end
sacl_present?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 79
def sacl_present?
  (control & Chef::ReservedNames::Win32::API::Security::SE_SACL_PRESENT) != 0
end
self_relative?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 83
def self_relative?
  (control & Chef::ReservedNames::Win32::API::Security::SE_SELF_RELATIVE) != 0
end
valid?() click to toggle source
# File lib/chef/win32/security/security_descriptor.rb, line 87
def valid?
  Chef::ReservedNames::Win32::Security.is_valid_security_descriptor(self)
end