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" unless 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 50
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 54
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 58
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 63
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 68
def sacl
  raise "SACL not present" unless 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 77
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 81
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 85
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 89
def valid?
  Chef::ReservedNames::Win32::Security.is_valid_security_descriptor(self)
end