### Home Classes Methods

### In Files

- lib/chef/win32/security/sid.rb
- lib/chef/win32/security/ace.rb
- lib/chef/win32/security/security_descriptor.rb
- lib/chef/win32/security/acl.rb
- lib/chef/win32/security/securable_object.rb
- lib/chef/win32/security/token.rb
- lib/chef/win32/security.rb

### Parent

Object

### Namespace

- CLASS Chef::ReservedNames::Win32::Security::ACE
- CLASS Chef::ReservedNames::Win32::Security::ACL
- CLASS Chef::ReservedNames::Win32::Security::SID
- CLASS Chef::ReservedNames::Win32::Security::SecurableObject
- CLASS Chef::ReservedNames::Win32::Security::SecurityDescriptor
- CLASS Chef::ReservedNames::Win32::Security::Token

### Methods

- ::add_access_allowed_ace
- ::add_access_allowed_ace_ex
- ::add_access_denied_ace
- ::add_access_denied_ace_ex
- ::add_ace
- ::adjust_token_privileges
- ::convert_sid_to_string_sid
- ::convert_string_sid_to_sid
- ::delete_ace
- ::equal_sid
- ::free_sid
- ::get_ace
- ::get_length_sid
- ::get_named_security_info
- ::get_security_descriptor_control
- ::get_security_descriptor_dacl
- ::get_security_descriptor_group
- ::get_security_descriptor_owner
- ::get_security_descriptor_sacl
- ::initialize_acl
- ::initialize_security_descriptor
- ::is_valid_acl
- ::is_valid_security_descriptor
- ::is_valid_sid
- ::lookup_account_name
- ::lookup_account_sid
- ::lookup_privilege_display_name
- ::lookup_privilege_name
- ::lookup_privilege_value
- ::make_absolute_sd
- ::open_process_token
- ::query_security_access_mask
- ::set_file_security
- ::set_named_security_info
- ::set_security_access_mask
- ::set_security_descriptor_group
- ::set_security_descriptor_owner
- ::set_security_descriptor_sacl
- ::with_privileges
- #set_security_descriptor_dacl

### Included Modules

- Chef::ReservedNames::Win32::API::Error
- Chef::ReservedNames::Win32::API::Security

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- Chef
- Chef::ApiClient
- Chef::Application
- Chef::Application::Client
- Chef::Application::Knife
- Chef::Application::Solo
- Chef::Application::Wakeup
- Chef::Application::WindowsService
- Chef::Certificate
- Chef::Checksum
- Chef::Checksum::Storage
- Chef::Checksum::Storage::Filesystem
- Chef::ChecksumCache
- Chef::Client
- Chef::Config
- Chef::Cookbook
- Chef::Cookbook::Chefignore
- Chef::Cookbook::CookbookVersionLoader
- Chef::Cookbook::FileSystemFileVendor
- Chef::Cookbook::FileVendor
- Chef::Cookbook::Metadata
- Chef::Cookbook::MinimalMetadata
- Chef::Cookbook::RemoteFileVendor
- Chef::Cookbook::SyntaxCheck
- Chef::CookbookCacheCleaner
- Chef::CookbookCollection
- Chef::CookbookLoader
- Chef::CookbookSiteStreamingUploader
- Chef::CookbookSiteStreamingUploader::MultipartStream
- Chef::CookbookSiteStreamingUploader::StreamPart
- Chef::CookbookSiteStreamingUploader::StringPart
- Chef::CookbookSynchronizer
- Chef::CookbookUploader
- Chef::CookbookVersion
- Chef::CookbookVersionSelector
- Chef::CouchDB
- Chef::Daemon
- Chef::DataBag
- Chef::DataBagItem
- Chef::EncryptedDataBagItem
- Chef::EncryptedDataBagItem::DecryptionFailure
- Chef::EncryptedDataBagItem::Decryptor
- Chef::EncryptedDataBagItem::Decryptor::Version0Decryptor
- Chef::EncryptedDataBagItem::Decryptor::Version1Decryptor
- Chef::EncryptedDataBagItem::UnsupportedCipher
- Chef::EncryptedDataBagItem::UnsupportedEncryptedDataBagItemFormat
- Chef::Environment
- Chef::EventDispatch
- Chef::EventDispatch::Base
- Chef::EventDispatch::Dispatcher
- Chef::Exceptions
- Chef::Exceptions::AmbiguousRunlistSpecification
- Chef::Exceptions::Application
- Chef::Exceptions::AttributeNotFound
- Chef::Exceptions::CannotDetermineNodeName
- Chef::Exceptions::CannotWritePrivateKey
- Chef::Exceptions::CommandTimeout
- Chef::Exceptions::ConfigurationError
- Chef::Exceptions::CookbookFrozen
- Chef::Exceptions::CookbookNotFound
- Chef::Exceptions::CookbookNotFoundInRepo
- Chef::Exceptions::CookbookVersionConflict
- Chef::Exceptions::CookbookVersionNameMismatch
- Chef::Exceptions::CookbookVersionSelection
- Chef::Exceptions::CookbookVersionSelection::InvalidRunListItems
- Chef::Exceptions::CookbookVersionSelection::UnsatisfiableRunListItem
- Chef::Exceptions::CouchDBNotFound
- Chef::Exceptions::Cron
- Chef::Exceptions::DsclCommandFailed
- Chef::Exceptions::EnclosingDirectoryDoesNotExist
- Chef::Exceptions::Env
- Chef::Exceptions::ErlCall
- Chef::Exceptions::Exec
- Chef::Exceptions::FileNotFound
- Chef::Exceptions::Group
- Chef::Exceptions::GroupIDNotFound
- Chef::Exceptions::Ifconfig
- Chef::Exceptions::IllegalChecksumRevert
- Chef::Exceptions::InsufficientPermissions
- Chef::Exceptions::InvalidCommandOption
- Chef::Exceptions::InvalidCookbookVersion
- Chef::Exceptions::InvalidDataBagItemID
- Chef::Exceptions::InvalidDataBagName
- Chef::Exceptions::InvalidDataBagPath
- Chef::Exceptions::InvalidEnvironmentRunListSpecification
- Chef::Exceptions::InvalidHomeDirectory
- Chef::Exceptions::InvalidPrivateKey
- Chef::Exceptions::InvalidRemoteGitReference
- Chef::Exceptions::InvalidResourceReference
- Chef::Exceptions::InvalidResourceSpecification
- Chef::Exceptions::InvalidVersionConstraint
- Chef::Exceptions::Link
- Chef::Exceptions::MissingLibrary
- Chef::Exceptions::MissingParentDirectory
- Chef::Exceptions::MissingRole
- Chef::Exceptions::Mount
- Chef::Exceptions::ObsoleteDependencySyntax
- Chef::Exceptions::Override
- Chef::Exceptions::Package
- Chef::Exceptions::PrivateKeyMissing
- Chef::Exceptions::QueryParseError
- Chef::Exceptions::RecipeNotFound
- Chef::Exceptions::RedirectLimitExceeded
- Chef::Exceptions::RequestedUIDUnavailable
- Chef::Exceptions::ResourceNotFound
- Chef::Exceptions::RoleNotFound
- Chef::Exceptions::Route
- Chef::Exceptions::SearchIndex
- Chef::Exceptions::Service
- Chef::Exceptions::ShellCommandFailed
- Chef::Exceptions::SolrConnectionError
- Chef::Exceptions::UnresolvableGitReference
- Chef::Exceptions::UnsupportedAction
- Chef::Exceptions::User
- Chef::Exceptions::UserIDNotFound
- Chef::Exceptions::ValidationFailed
- Chef::Exceptions::Win32APIError
- Chef::Exceptions::Win32APIFunctionNotImplemented
- Chef::FileAccessControl
- Chef::FileAccessControl::Unix
- Chef::FileAccessControl::Windows
- Chef::FileAccessControl::Windows::Security
- Chef::FileCache
- Chef::Formatters
- Chef::Formatters::APIErrorFormatting
- Chef::Formatters::Base
- Chef::Formatters::Doc
- Chef::Formatters::ErrorDescription
- Chef::Formatters::ErrorInspectors
- Chef::Formatters::ErrorInspectors::CompileErrorInspector
- Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector
- Chef::Formatters::ErrorInspectors::CookbookSyncErrorInspector
- Chef::Formatters::ErrorInspectors::NodeLoadErrorInspector
- Chef::Formatters::ErrorInspectors::RegistrationErrorInspector
- Chef::Formatters::ErrorInspectors::ResourceFailureInspector
- Chef::Formatters::ErrorInspectors::RunListExpansionErrorInspector
- Chef::Formatters::ErrorMapper
- Chef::Formatters::Minimal
- Chef::Formatters::NullFormatter
- Chef::Formatters::Outputter
- Chef::Formatters::UnknownFormatter
- Chef::Handler
- Chef::Handler::ErrorReport
- Chef::Handler::JsonFile
- Chef::IndexQueue
- Chef::IndexQueue::AmqpClient
- Chef::IndexQueue::Consumer
- Chef::IndexQueue::Consumer::ClassMethods
- Chef::IndexQueue::Indexable
- Chef::IndexQueue::Indexable::ClassMethods
- Chef::JSONCompat
- Chef::Knife
- Chef::Knife::Bootstrap
- Chef::Knife::ClientBulkDelete
- Chef::Knife::ClientCreate
- Chef::Knife::ClientDelete
- Chef::Knife::ClientEdit
- Chef::Knife::ClientList
- Chef::Knife::ClientReregister
- Chef::Knife::ClientShow
- Chef::Knife::Configure
- Chef::Knife::ConfigureClient
- Chef::Knife::CookbookBulkDelete
- Chef::Knife::CookbookCreate
- Chef::Knife::CookbookDelete
- Chef::Knife::CookbookDownload
- Chef::Knife::CookbookList
- Chef::Knife::CookbookMetadata
- Chef::Knife::CookbookMetadataFromFile
- Chef::Knife::CookbookSCMRepo
- Chef::Knife::CookbookShow
- Chef::Knife::CookbookSiteDownload
- Chef::Knife::CookbookSiteInstall
- Chef::Knife::CookbookSiteList
- Chef::Knife::CookbookSiteSearch
- Chef::Knife::CookbookSiteShare
- Chef::Knife::CookbookSiteShow
- Chef::Knife::CookbookSiteUnshare
- Chef::Knife::CookbookSiteVendor
- Chef::Knife::CookbookTest
- Chef::Knife::CookbookUpload
- Chef::Knife::Core
- Chef::Knife::Core::BootstrapContext
- Chef::Knife::Core::GenericPresenter
- Chef::Knife::Core::NodeFormattingOptions
- Chef::Knife::Core::NodePresenter
- Chef::Knife::Core::ObjectLoader
- Chef::Knife::Core::ObjectLoader::ObjectType
- Chef::Knife::Core::TextFormatter
- Chef::Knife::DataBagCreate
- Chef::Knife::DataBagDelete
- Chef::Knife::DataBagEdit
- Chef::Knife::DataBagFromFile
- Chef::Knife::DataBagList
- Chef::Knife::DataBagShow
- Chef::Knife::EnvironmentCreate
- Chef::Knife::EnvironmentDelete
- Chef::Knife::EnvironmentEdit
- Chef::Knife::EnvironmentFromFile
- Chef::Knife::EnvironmentList
- Chef::Knife::EnvironmentShow
- Chef::Knife::Exec
- Chef::Knife::Help
- Chef::Knife::IndexRebuild
- Chef::Knife::NodeBulkDelete
- Chef::Knife::NodeCreate
- Chef::Knife::NodeDelete
- Chef::Knife::NodeEdit
- Chef::Knife::NodeEditor
- Chef::Knife::NodeFromFile
- Chef::Knife::NodeList
- Chef::Knife::NodeRunListAdd
- Chef::Knife::NodeRunListRemove
- Chef::Knife::NodeShow
- Chef::Knife::RecipeList
- Chef::Knife::RoleBulkDelete
- Chef::Knife::RoleCreate
- Chef::Knife::RoleDelete
- Chef::Knife::RoleEdit
- Chef::Knife::RoleFromFile
- Chef::Knife::RoleList
- Chef::Knife::RoleShow
- Chef::Knife::Search
- Chef::Knife::Ssh
- Chef::Knife::Status
- Chef::Knife::SubcommandLoader
- Chef::Knife::TagCreate
- Chef::Knife::TagDelete
- Chef::Knife::TagList
- Chef::Knife::UI
- Chef::Log
- Chef::Log::Formatter
- Chef::MinimalCookbookVersion
- Chef::Mixin
- Chef::Mixin::CheckHelper
- Chef::Mixin::Checksum
- Chef::Mixin::Command
- Chef::Mixin::Command::Unix
- Chef::Mixin::Command::Windows
- Chef::Mixin::ConvertToClassName
- Chef::Mixin::CreatePath
- Chef::Mixin::DeepMerge
- Chef::Mixin::DeepMerge::InvalidParameter
- Chef::Mixin::Deprecation
- Chef::Mixin::Deprecation::DeprecatedInstanceVariable
- Chef::Mixin::Deprecation::DeprecatedObjectProxyBase
- Chef::Mixin::EnforceOwnershipAndPermissions
- Chef::Mixin::FileClass
- Chef::Mixin::FromFile
- Chef::Mixin::GetSourceFromPackage
- Chef::Mixin::Language
- Chef::Mixin::Language::PlatformDependentValue
- Chef::Mixin::Language::PlatformFamilyDependentValue
- Chef::Mixin::LanguageIncludeAttribute
- Chef::Mixin::LanguageIncludeRecipe
- Chef::Mixin::ParamsValidate
- Chef::Mixin::PathSanity
- Chef::Mixin::RecipeDefinitionDSLCore
- Chef::Mixin::Securable
- Chef::Mixin::ShellOut
- Chef::Mixin::Template
- Chef::Mixin::Template::ChefContext
- Chef::Mixin::Template::TemplateError
- Chef::Mixin::WhyRun
- Chef::Mixin::WhyRun::ConvergeActions
- Chef::Mixin::WhyRun::ResourceRequirements
- Chef::Mixin::WhyRun::ResourceRequirements::Assertion
- Chef::Mixin::WhyRun::ResourceRequirements::Assertion::AssertionFailure
- Chef::Mixin::XMLEscape
- Chef::Mixin::XMLEscape::FastXS
- Chef::Mixin::XMLEscape::PureRuby
- Chef::Node
- Chef::Node::Attribute
- Chef::OpenIDRegistration
- Chef::Platform
- Chef::Provider
- Chef::Provider::Breakpoint
- Chef::Provider::CookbookFile
- Chef::Provider::Cron
- Chef::Provider::Cron::Solaris
- Chef::Provider::Deploy
- Chef::Provider::Deploy::Revision
- Chef::Provider::Deploy::Timestamped
- Chef::Provider::Directory
- Chef::Provider::Env
- Chef::Provider::Env::Windows
- Chef::Provider::ErlCall
- Chef::Provider::Execute
- Chef::Provider::File
- Chef::Provider::Git
- Chef::Provider::Group
- Chef::Provider::Group::Aix
- Chef::Provider::Group::Dscl
- Chef::Provider::Group::Gpasswd
- Chef::Provider::Group::Groupadd
- Chef::Provider::Group::Groupmod
- Chef::Provider::Group::Pw
- Chef::Provider::Group::Suse
- Chef::Provider::Group::Usermod
- Chef::Provider::Group::Windows
- Chef::Provider::HttpRequest
- Chef::Provider::Ifconfig
- Chef::Provider::Link
- Chef::Provider::Log
- Chef::Provider::Log::ChefLog
- Chef::Provider::Mdadm
- Chef::Provider::Mount
- Chef::Provider::Mount::Mount
- Chef::Provider::Mount::Windows
- Chef::Provider::Ohai
- Chef::Provider::Package
- Chef::Provider::Package::Apt
- Chef::Provider::Package::Dpkg
- Chef::Provider::Package::EasyInstall
- Chef::Provider::Package::Freebsd
- Chef::Provider::Package::Ips
- Chef::Provider::Package::Macports
- Chef::Provider::Package::Pacman
- Chef::Provider::Package::Portage
- Chef::Provider::Package::Rpm
- Chef::Provider::Package::Rubygems
- Chef::Provider::Package::Rubygems::AlternateGemEnvironment
- Chef::Provider::Package::Rubygems::CurrentGemEnvironment
- Chef::Provider::Package::Rubygems::GemEnvironment
- Chef::Provider::Package::SmartOS
- Chef::Provider::Package::Solaris
- Chef::Provider::Package::Yum
- Chef::Provider::Package::Yum::RPMDb
- Chef::Provider::Package::Yum::RPMDbPackage
- Chef::Provider::Package::Yum::RPMDependency
- Chef::Provider::Package::Yum::RPMPackage
- Chef::Provider::Package::Yum::RPMProvide
- Chef::Provider::Package::Yum::RPMRequire
- Chef::Provider::Package::Yum::RPMUtils
- Chef::Provider::Package::Yum::RPMVersion
- Chef::Provider::Package::Yum::YumCache
- Chef::Provider::Package::Zypper
- Chef::Provider::RemoteDirectory
- Chef::Provider::RemoteFile
- Chef::Provider::ResourceUpdate
- Chef::Provider::Route
- Chef::Provider::RubyBlock
- Chef::Provider::Script
- Chef::Provider::Service
- Chef::Provider::Service::Arch
- Chef::Provider::Service::Debian
- Chef::Provider::Service::Freebsd
- Chef::Provider::Service::Gentoo
- Chef::Provider::Service::Init
- Chef::Provider::Service::Insserv
- Chef::Provider::Service::Invokercd
- Chef::Provider::Service::Macosx
- Chef::Provider::Service::Redhat
- Chef::Provider::Service::Simple
- Chef::Provider::Service::Solaris
- Chef::Provider::Service::Systemd
- Chef::Provider::Service::Upstart
- Chef::Provider::Service::Windows
- Chef::Provider::Subversion
- Chef::Provider::Template
- Chef::Provider::User
- Chef::Provider::User::Dscl
- Chef::Provider::User::Pw
- Chef::Provider::User::Useradd
- Chef::Provider::User::Windows
- Chef::REST
- Chef::REST::AuthCredentials
- Chef::REST::CookieJar
- Chef::REST::NoopInflater
- Chef::REST::RESTRequest
- Chef::Recipe
- Chef::ReservedNames
- Chef::ReservedNames::Win32
- Chef::ReservedNames::Win32::API
- Chef::ReservedNames::Win32::API::Error
- Chef::ReservedNames::Win32::API::File
- Chef::ReservedNames::Win32::API::File::BY_HANDLE_FILE_INFORMATION
- Chef::ReservedNames::Win32::API::File::FILETIME
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_GENERIC
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_MOUNT_POINT
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_SYMBOLIC_LINK
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_UNION
- Chef::ReservedNames::Win32::API::File::SECURITY_ATTRIBUTES
- Chef::ReservedNames::Win32::API::File::WIN32_FIND_DATA
- Chef::ReservedNames::Win32::API::Macros
- Chef::ReservedNames::Win32::API::Memory
- Chef::ReservedNames::Win32::API::PSAPI
- Chef::ReservedNames::Win32::API::PSAPI::PROCESS_MEMORY_COUNTERS
- Chef::ReservedNames::Win32::API::Process
- Chef::ReservedNames::Win32::API::Security
- Chef::ReservedNames::Win32::API::Security::ACE_HEADER
- Chef::ReservedNames::Win32::API::Security::ACE_WITH_MASK_AND_SID
- Chef::ReservedNames::Win32::API::Security::ACLStruct
- Chef::ReservedNames::Win32::API::Security::LUID
- Chef::ReservedNames::Win32::API::Security::LUID_AND_ATTRIBUTES
- Chef::ReservedNames::Win32::API::Security::TOKEN_PRIVILEGES
- Chef::ReservedNames::Win32::API::System
- Chef::ReservedNames::Win32::API::System::OSVERSIONINFOEX
- Chef::ReservedNames::Win32::API::Unicode
- Chef::ReservedNames::Win32::Error
- Chef::ReservedNames::Win32::File
- Chef::ReservedNames::Win32::File::Info
- Chef::ReservedNames::Win32::Handle
- Chef::ReservedNames::Win32::Memory
- Chef::ReservedNames::Win32::Process
- Chef::ReservedNames::Win32::Security
- Chef::ReservedNames::Win32::Security::ACE
- Chef::ReservedNames::Win32::Security::ACL
- Chef::ReservedNames::Win32::Security::SID
- Chef::ReservedNames::Win32::Security::SecurableObject
- Chef::ReservedNames::Win32::Security::SecurityDescriptor
- Chef::ReservedNames::Win32::Security::Token
- Chef::ReservedNames::Win32::Unicode
- Chef::ReservedNames::Win32::Version
- Chef::Resource
- Chef::Resource::AptPackage
- Chef::Resource::Bash
- Chef::Resource::Breakpoint
- Chef::Resource::ChefGem
- Chef::Resource::Conditional
- Chef::Resource::CookbookFile
- Chef::Resource::Cron
- Chef::Resource::Csh
- Chef::Resource::Deploy
- Chef::Resource::DeployBranch
- Chef::Resource::DeployRevision
- Chef::Resource::Directory
- Chef::Resource::DpkgPackage
- Chef::Resource::EasyInstallPackage
- Chef::Resource::Env
- Chef::Resource::ErlCall
- Chef::Resource::Execute
- Chef::Resource::File
- Chef::Resource::FreebsdPackage
- Chef::Resource::GemPackage
- Chef::Resource::Git
- Chef::Resource::Group
- Chef::Resource::HttpRequest
- Chef::Resource::Ifconfig
- Chef::Resource::IpsPackage
- Chef::Resource::Link
- Chef::Resource::Log
- Chef::Resource::MacportsPackage
- Chef::Resource::Mdadm
- Chef::Resource::Mount
- Chef::Resource::Notification
- Chef::Resource::Ohai
- Chef::Resource::Package
- Chef::Resource::PacmanPackage
- Chef::Resource::Perl
- Chef::Resource::PlatformMap
- Chef::Resource::PortagePackage
- Chef::Resource::Python
- Chef::Resource::RemoteDirectory
- Chef::Resource::RemoteFile
- Chef::Resource::Route
- Chef::Resource::RpmPackage
- Chef::Resource::Ruby
- Chef::Resource::RubyBlock
- Chef::Resource::Scm
- Chef::Resource::Script
- Chef::Resource::Service
- Chef::Resource::SmartOSPackage
- Chef::Resource::SolarisPackage
- Chef::Resource::Subversion
- Chef::Resource::Template
- Chef::Resource::TimestampedDeploy
- Chef::Resource::User
- Chef::Resource::YumPackage
- Chef::ResourceCollection
- Chef::ResourceCollection::StepableIterator
- Chef::ResourceDefinition
- Chef::ResourceDefinitionList
- Chef::ResourceReporter
- Chef::ResourceReporter::ResourceReport
- Chef::Role
- Chef::RunContext
- Chef::RunList
- Chef::RunList::RunListExpansion
- Chef::RunList::RunListExpansionFromAPI
- Chef::RunList::RunListExpansionFromCouchDB
- Chef::RunList::RunListExpansionFromDisk
- Chef::RunList::RunListItem
- Chef::RunList::VersionedRecipeList
- Chef::RunStatus
- Chef::Runner
- Chef::Sandbox
- Chef::ScanAccessControl
- Chef::Search
- Chef::Search::Query
- Chef::ShellOut
- Chef::SolrQuery
- Chef::SolrQuery::QueryTransform
- Chef::SolrQuery::SolrHTTPRequest
- Chef::StreamingCookbookUploader
- Chef::StreamingCookbookUploader::MultipartStream
- Chef::StreamingCookbookUploader::StreamPart
- Chef::StreamingCookbookUploader::StringPart
- Chef::Util
- Chef::Util::FileEdit
- Chef::Util::Windows
- Chef::Util::Windows::NetGroup
- Chef::Util::Windows::NetUse
- Chef::Util::Windows::NetUser
- Chef::Util::Windows::Volume
- Chef::Version
- Chef::VersionConstraint
- Chef::WebUIUser
- Lucene
- Lucene::AndOperator
- Lucene::BinaryOp
- Lucene::Body
- Lucene::BoostOp
- Lucene::ExclFieldRange
- Lucene::Field
- Lucene::FieldName
- Lucene::FieldRange
- Lucene::FuzzyOp
- Lucene::FuzzyParam
- Lucene::Group
- Lucene::InclFieldRange
- Lucene::NotOperator
- Lucene::OrOperator
- Lucene::Phrase
- Lucene::ProhibitedOperator
- Lucene::RangeValue
- Lucene::RequiredOperator
- Lucene::Term
- Lucene::UnaryOp
- Shef
- Shef::ClientSession
- Shef::DoppelGangerClient
- Shef::DoppelGangerSession
- Shef::Extensions
- Shef::Extensions::FalseClass
- Shef::Extensions::ObjectCoreExtensions
- Shef::Extensions::String
- Shef::Extensions::Symbol
- Shef::Extensions::TrueClass
- Shef::ModelWrapper
- Shef::NamedDataBagWrapper
- Shef::Options
- Shef::ShefREST
- Shef::ShefSession
- Shef::SoloSession
- Shef::StandAloneSession
- Net
- Net::HTTPError
- Net::HTTPFatalError
- Net::HTTPRetriableError
- Net::HTTPServerException
- Moneta
- Moneta::BasicFile
- Moneta::Defaults
- FFI
- FFI::Pointer
- FileUtils
- FileUtils::Entry_
- ChefNetHTTPExceptionExtensions
- Dir
- FalseClass
- Mash
- Numeric
- Object
- Regexp
- String
- Symbol
- TrueClass

No matching classes.

# Chef::ReservedNames::Win32::Security

### Public Class Methods

add_access_allowed_ace(acl, sid, access_mask, revision = ACL_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 44
    def self.add_access_allowed_ace(acl, sid, access_mask, revision = ACL_REVISION)
      acl = acl.pointer if acl.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)
      unless AddAccessAllowedAce(acl, revision, access_mask, sid)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

add_access_allowed_ace_ex(acl, sid, access_mask, flags = 0, revision = ACL_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 52
    def self.add_access_allowed_ace_ex(acl, sid, access_mask, flags = 0, revision = ACL_REVISION)
      acl = acl.pointer if acl.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)
      unless AddAccessAllowedAceEx(acl, revision, flags, access_mask, sid)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

add_access_denied_ace(acl, sid, access_mask, revision = ACL_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 60
    def self.add_access_denied_ace(acl, sid, access_mask, revision = ACL_REVISION)
      acl = acl.pointer if acl.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)
      unless AddAccessDeniedAce(acl, revision, access_mask, sid)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

add_access_denied_ace_ex(acl, sid, access_mask, flags = 0, revision = ACL_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 68
    def self.add_access_denied_ace_ex(acl, sid, access_mask, flags = 0, revision = ACL_REVISION)
      acl = acl.pointer if acl.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)
      unless AddAccessDeniedAceEx(acl, revision, flags, access_mask, sid)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

add_ace(acl, ace, insert_position = MAXDWORD, revision = ACL_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 35
    def self.add_ace(acl, ace, insert_position = MAXDWORD, revision = ACL_REVISION)
      acl = acl.pointer if acl.respond_to?(:pointer)
      ace = ace.pointer if ace.respond_to?(:pointer)
      ace_size = ACE_HEADER.new(ace)[:AceSize]
      unless AddAce(acl, revision, insert_position, ace, ace_size)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

adjust_token_privileges(token, privileges) click to toggle source

    # File lib/chef/win32/security.rb, line 76
    def self.adjust_token_privileges(token, privileges)
      token = token.handle if token.respond_to?(:handle)
      old_privileges_size = FFI::Buffer.new(:long).write_long(privileges.size_with_privileges)
      old_privileges = TOKEN_PRIVILEGES.new(FFI::Buffer.new(old_privileges_size.read_long))
      unless AdjustTokenPrivileges(token.handle, false, privileges, privileges.size_with_privileges, old_privileges, old_privileges_size)
        Chef::ReservedNames::Win32::Error.raise!
      end

      old_privileges
    end

convert_sid_to_string_sid(sid) click to toggle source

    # File lib/chef/win32/security.rb, line 87
    def self.convert_sid_to_string_sid(sid)
      sid = sid.pointer if sid.respond_to?(:pointer)
      result = FFI::MemoryPointer.new :pointer
      # TODO: use the W version
      unless ConvertSidToStringSidA(sid, result)
        Chef::ReservedNames::Win32::Error.raise!
      end

      result_string = result.read_pointer.read_string

      Chef::ReservedNames::Win32::Memory.local_free(result.read_pointer)

      result_string
    end

convert_string_sid_to_sid(string_sid) click to toggle source

    # File lib/chef/win32/security.rb, line 102
    def self.convert_string_sid_to_sid(string_sid)
      result = FFI::MemoryPointer.new :pointer
      unless ConvertStringSidToSidW(string_sid.to_wstring, result)
        Chef::ReservedNames::Win32::Error.raise!
      end

      result_pointer = result.read_pointer
      sid = SID.new(result_pointer)

      # The result pointer must be freed with local_free
      ObjectSpace.define_finalizer(sid, Memory.local_free_finalizer(result_pointer))

      sid
    end

delete_ace(acl, index) click to toggle source

    # File lib/chef/win32/security.rb, line 117
    def self.delete_ace(acl, index)
      acl = acl.pointer if acl.respond_to?(:pointer)
      unless DeleteAce(acl, index)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

equal_sid(sid1, sid2) click to toggle source

    # File lib/chef/win32/security.rb, line 124
    def self.equal_sid(sid1, sid2)
      sid1 = sid1.pointer if sid1.respond_to?(:pointer)
      sid2 = sid2.pointer if sid2.respond_to?(:pointer)
      EqualSid(sid1, sid2)
    end

free_sid(sid) click to toggle source

    # File lib/chef/win32/security.rb, line 130
    def self.free_sid(sid)
      sid = sid.pointer if sid.respond_to?(:pointer)
      unless FreeSid(sid).null?
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

get_ace(acl, index) click to toggle source

    # File lib/chef/win32/security.rb, line 137
    def self.get_ace(acl, index)
      acl = acl.pointer if acl.respond_to?(:pointer)
      ace = FFI::Buffer.new :pointer
      unless GetAce(acl, index, ace)
        Chef::ReservedNames::Win32::Error.raise!
      end
      ACE.new(ace.read_pointer, acl)
    end

get_length_sid(sid) click to toggle source

    # File lib/chef/win32/security.rb, line 146
    def self.get_length_sid(sid)
      sid = sid.pointer if sid.respond_to?(:pointer)
      GetLengthSid(sid)
    end

get_named_security_info(path, type = :SE_FILE_OBJECT, info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION) click to toggle source

    # File lib/chef/win32/security.rb, line 151
    def self.get_named_security_info(path, type = :SE_FILE_OBJECT, info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION)
      security_descriptor = FFI::MemoryPointer.new :pointer
      hr = GetNamedSecurityInfoW(path.to_wstring, type, info, nil, nil, nil, nil, security_descriptor)
      if hr != ERROR_SUCCESS
        Chef::ReservedNames::Win32::Error.raise!("get_named_security_info(#{path}, #{type}, #{info})")
      end

      result_pointer = security_descriptor.read_pointer
      result = SecurityDescriptor.new(result_pointer)

      # This memory has to be freed with LocalFree.
      ObjectSpace.define_finalizer(result, Memory.local_free_finalizer(result_pointer))

      result
    end

get_security_descriptor_control(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 167
    def self.get_security_descriptor_control(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      result = FFI::Buffer.new :ushort
      version = FFI::Buffer.new :uint32
      unless GetSecurityDescriptorControl(security_descriptor, result, version)
        Chef::ReservedNames::Win32::Error.raise!
      end
      [ result.read_ushort, version.read_uint32 ]
    end

get_security_descriptor_dacl(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 177
    def self.get_security_descriptor_dacl(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      present = FFI::Buffer.new :bool
      defaulted = FFI::Buffer.new :bool
      acl = FFI::Buffer.new :pointer
      unless GetSecurityDescriptorDacl(security_descriptor, present, acl, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
      acl = acl.read_pointer
      [ present.read_char != 0, acl.null? ? nil : ACL.new(acl, security_descriptor), defaulted.read_char != 0 ]
    end

get_security_descriptor_group(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 189
    def self.get_security_descriptor_group(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      result = FFI::Buffer.new :pointer
      defaulted = FFI::Buffer.new :long
      unless GetSecurityDescriptorGroup(security_descriptor, result, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end

      sid = SID.new(result.read_pointer, security_descriptor)
      defaulted = defaulted.read_char != 0
      [ sid, defaulted ]
    end

get_security_descriptor_owner(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 202
    def self.get_security_descriptor_owner(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      result = FFI::Buffer.new :pointer
      defaulted = FFI::Buffer.new :long
      unless GetSecurityDescriptorOwner(security_descriptor, result, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end

      sid = SID.new(result.read_pointer, security_descriptor)
      defaulted = defaulted.read_char != 0
      [ sid, defaulted ]
    end

get_security_descriptor_sacl(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 215
    def self.get_security_descriptor_sacl(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      present = FFI::Buffer.new :bool
      defaulted = FFI::Buffer.new :bool
      acl = FFI::Buffer.new :pointer
      unless GetSecurityDescriptorSacl(security_descriptor, present, acl, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
      acl = acl.read_pointer
      [ present.read_char != 0, acl.null? ? nil : ACL.new(acl, security_descriptor), defaulted.read_char != 0 ]
    end

initialize_acl(acl_size) click to toggle source

    # File lib/chef/win32/security.rb, line 227
    def self.initialize_acl(acl_size)
      acl = FFI::MemoryPointer.new acl_size
      unless InitializeAcl(acl, acl_size, ACL_REVISION)
        Chef::ReservedNames::Win32::Error.raise!
      end
      ACL.new(acl)
    end

initialize_security_descriptor(revision = SECURITY_DESCRIPTOR_REVISION) click to toggle source

    # File lib/chef/win32/security.rb, line 235
    def self.initialize_security_descriptor(revision = SECURITY_DESCRIPTOR_REVISION)
      security_descriptor = FFI::MemoryPointer.new SECURITY_DESCRIPTOR_MIN_LENGTH
      unless InitializeSecurityDescriptor(security_descriptor, revision)
        Chef::ReservedNames::Win32::Error.raise!
      end
      SecurityDescriptor.new(security_descriptor)
    end

is_valid_acl(acl) click to toggle source

    # File lib/chef/win32/security.rb, line 243
    def self.is_valid_acl(acl)
      acl = acl.pointer if acl.respond_to?(:pointer)
      IsValidAcl(acl) != 0
    end

is_valid_security_descriptor(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 248
    def self.is_valid_security_descriptor(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      IsValidSecurityDescriptor(security_descriptor) != 0
    end

is_valid_sid(sid) click to toggle source

    # File lib/chef/win32/security.rb, line 253
    def self.is_valid_sid(sid)
      sid = sid.pointer if sid.respond_to?(:pointer)
      IsValidSid(sid) != 0
    end

lookup_account_name(name, system_name = nil) click to toggle source

    # File lib/chef/win32/security.rb, line 258
    def self.lookup_account_name(name, system_name = nil)
      # Figure out how big the buffers need to be
      sid_size = FFI::Buffer.new(:long).write_long(0)
      referenced_domain_name_size = FFI::Buffer.new(:long).write_long(0)
      system_name = system_name.to_wstring if system_name
      if LookupAccountNameW(system_name, name.to_wstring, nil, sid_size, nil, referenced_domain_name_size, nil)
        raise "Expected ERROR_INSUFFICIENT_BUFFER from LookupAccountName, and got no error!"
      elsif Chef::ReservedNames::Win32::Error.get_last_error != ERROR_INSUFFICIENT_BUFFER
        Chef::ReservedNames::Win32::Error.raise!
      end

      sid = FFI::MemoryPointer.new :char, sid_size.read_long
      referenced_domain_name = FFI::MemoryPointer.new :char, (referenced_domain_name_size.read_long*2)
      use = FFI::Buffer.new(:long).write_long(0)
      unless LookupAccountNameW(system_name, name.to_wstring, sid, sid_size, referenced_domain_name, referenced_domain_name_size, use)
        Chef::ReservedNames::Win32::Error.raise!
      end

      [ referenced_domain_name.read_wstring(referenced_domain_name_size.read_long), SID.new(sid), use.read_long ]
    end

lookup_account_sid(sid, system_name = nil) click to toggle source

    # File lib/chef/win32/security.rb, line 279
    def self.lookup_account_sid(sid, system_name = nil)
      sid = sid.pointer if sid.respond_to?(:pointer)
      # Figure out how big the buffer needs to be
      name_size = FFI::Buffer.new(:long).write_long(0)
      referenced_domain_name_size = FFI::Buffer.new(:long).write_long(0)
      system_name = system_name.to_wstring if system_name
      if LookupAccountSidW(system_name, sid, nil, name_size, nil, referenced_domain_name_size, nil)
        raise "Expected ERROR_INSUFFICIENT_BUFFER from LookupAccountSid, and got no error!"
      elsif Chef::ReservedNames::Win32::Error::get_last_error != ERROR_INSUFFICIENT_BUFFER
        Chef::ReservedNames::Win32::Error.raise!
      end

      name = FFI::MemoryPointer.new :char, (name_size.read_long*2)
      referenced_domain_name = FFI::MemoryPointer.new :char, (referenced_domain_name_size.read_long*2)
      use = FFI::Buffer.new(:long).write_long(0)
      unless LookupAccountSidW(system_name, sid, name, name_size, referenced_domain_name, referenced_domain_name_size, use)
        Chef::ReservedNames::Win32::Error.raise!
      end

      [ referenced_domain_name.read_wstring(referenced_domain_name_size.read_long), name.read_wstring(name_size.read_long), use.read_long ]
    end

lookup_privilege_display_name(system_name, name) click to toggle source

    # File lib/chef/win32/security.rb, line 318
    def self.lookup_privilege_display_name(system_name, name)
      system_name = system_name.to_wstring if system_name
      display_name_size = FFI::Buffer.new(:long).write_long(0)
      language_id = FFI::Buffer.new(:long)
      if LookupPrivilegeDisplayNameW(system_name, name.to_wstring, nil, display_name_size, language_id)
        raise "Expected ERROR_INSUFFICIENT_BUFFER from LookupPrivilegeDisplayName, and got no error!"
      elsif Chef::ReservedNames::Win32::Error.get_last_error != ERROR_INSUFFICIENT_BUFFER
        Chef::ReservedNames::Win32::Error.raise!
      end

      display_name = FFI::MemoryPointer.new :char, (display_name_size.read_long*2)
      unless LookupPrivilegeDisplayNameW(system_name, name.to_wstring, display_name, display_name_size, language_id)
        Chef::ReservedNames::Win32::Error.raise!
      end

      [ display_name.read_wstring(display_name_size.read_long), language_id.read_long ]
    end

lookup_privilege_name(system_name, luid) click to toggle source

    # File lib/chef/win32/security.rb, line 301
    def self.lookup_privilege_name(system_name, luid)
      system_name = system_name.to_wstring if system_name
      name_size = FFI::Buffer.new(:long).write_long(0)
      if LookupPrivilegeNameW(system_name, luid, nil, name_size)
        raise "Expected ERROR_INSUFFICIENT_BUFFER from LookupPrivilegeName, and got no error!"
      elsif Chef::ReservedNames::Win32::Error.get_last_error != ERROR_INSUFFICIENT_BUFFER
        Chef::ReservedNames::Win32::Error.raise!
      end

      name = FFI::MemoryPointer.new :char, (name_size.read_long*2)
      unless LookupPrivilegeNameW(system_name, luid, name, name_size)
        Chef::ReservedNames::Win32::Error.raise!
      end

      name.read_wstring(name_size.read_long)
    end

lookup_privilege_value(system_name, name) click to toggle source

    # File lib/chef/win32/security.rb, line 336
    def self.lookup_privilege_value(system_name, name)
      luid = FFI::Buffer.new(:uint64).write_uint64(0)
      system_name = system_name.to_wstring if system_name
      unless LookupPrivilegeValueW(system_name, name.to_wstring, luid)
        Win32::Error.raise!
      end
      luid.read_uint64
    end

make_absolute_sd(security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 345
    def self.make_absolute_sd(security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)

      # Figure out buffer sizes
      absolute_sd_size = FFI::Buffer.new(:long).write_long(0)
      dacl_size = FFI::Buffer.new(:long).write_long(0)
      sacl_size = FFI::Buffer.new(:long).write_long(0)
      owner_size = FFI::Buffer.new(:long).write_long(0)
      group_size = FFI::Buffer.new(:long).write_long(0)
      if MakeAbsoluteSD(security_descriptor, nil, absolute_sd_size, nil, dacl_size, nil, sacl_size, nil, owner_size, nil, group_size)
        raise "Expected ERROR_INSUFFICIENT_BUFFER from MakeAbsoluteSD, and got no error!"
      elsif Chef::ReservedNames::Win32::Error.get_last_error != ERROR_INSUFFICIENT_BUFFER
        Chef::ReservedNames::Win32::Error.raise!
      end

      absolute_sd = FFI::MemoryPointer.new absolute_sd_size.read_long
      owner = FFI::MemoryPointer.new owner_size.read_long
      group = FFI::MemoryPointer.new group_size.read_long
      dacl = FFI::MemoryPointer.new dacl_size.read_long
      sacl = FFI::MemoryPointer.new sacl_size.read_long
      unless MakeAbsoluteSD(security_descriptor, absolute_sd, absolute_sd_size, dacl, dacl_size, sacl, sacl_size, owner, owner_size, group, group_size)
        Chef::ReservedNames::Win32::Error.raise!
      end

      [ SecurityDescriptor.new(absolute_sd), SID.new(owner), SID.new(group), ACL.new(dacl), ACL.new(sacl) ]
    end

open_process_token(process, desired_access) click to toggle source

    # File lib/chef/win32/security.rb, line 372
    def self.open_process_token(process, desired_access)
      process = process.handle if process.respond_to?(:handle)
      process = process.handle if process.respond_to?(:handle)
      token = FFI::Buffer.new(:ulong)
      unless OpenProcessToken(process, desired_access, token)
        Chef::ReservedNames::Win32::Error.raise!
      end
      Token.new(Handle.new(token.read_ulong))
    end

query_security_access_mask(security_information) click to toggle source

    # File lib/chef/win32/security.rb, line 382
    def self.query_security_access_mask(security_information)
      result = FFI::Buffer.new(:long)
      QuerySecurityAccessMask(security_information, result)
      result.read_long
    end

set_file_security(path, security_information, security_descriptor) click to toggle source

    # File lib/chef/win32/security.rb, line 388
    def self.set_file_security(path, security_information, security_descriptor)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      unless SetFileSecurityW(path.to_wstring, security_information, security_descriptor)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

set_named_security_info(path, type, args) click to toggle source

    # File lib/chef/win32/security.rb, line 395
    def self.set_named_security_info(path, type, args)
      owner = args[:owner]
      group = args[:group]
      dacl = args[:dacl]
      sacl = args[:sacl]
      owner = owner.pointer if owner && owner.respond_to?(:pointer)
      group = group.pointer if group && group.respond_to?(:pointer)
      dacl = dacl.pointer if dacl && dacl.respond_to?(:pointer)
      sacl = sacl.pointer if sacl && sacl.respond_to?(:pointer)

      # Determine the security_information flags
      security_information = 0
      security_information |= OWNER_SECURITY_INFORMATION if args.has_key?(:owner)
      security_information |= GROUP_SECURITY_INFORMATION if args.has_key?(:group)
      security_information |= DACL_SECURITY_INFORMATION if args.has_key?(:dacl)
      security_information |= SACL_SECURITY_INFORMATION if args.has_key?(:sacl)
      if args.has_key?(:dacl_inherits)
        security_information |= (args[:dacl_inherits] ? UNPROTECTED_DACL_SECURITY_INFORMATION : PROTECTED_DACL_SECURITY_INFORMATION)
      end
      if args.has_key?(:sacl_inherits)
        security_information |= (args[:sacl_inherits] ? UNPROTECTED_SACL_SECURITY_INFORMATION : PROTECTED_SACL_SECURITY_INFORMATION)
      end

      hr = SetNamedSecurityInfoW(path.to_wstring, type, security_information, owner, group, dacl, sacl)
      if hr != ERROR_SUCCESS
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

set_security_access_mask(security_information) click to toggle source

    # File lib/chef/win32/security.rb, line 424
    def self.set_security_access_mask(security_information)
      result = FFI::Buffer.new(:long)
      SetSecurityAccessMask(security_information, result)
      result.read_long
    end

set_security_descriptor_group(security_descriptor, sid, defaulted = false) click to toggle source

    # File lib/chef/win32/security.rb, line 440
    def self.set_security_descriptor_group(security_descriptor, sid, defaulted = false)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)

      unless SetSecurityDescriptorGroup(security_descriptor, sid, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

set_security_descriptor_owner(security_descriptor, sid, defaulted = false) click to toggle source

    # File lib/chef/win32/security.rb, line 449
    def self.set_security_descriptor_owner(security_descriptor, sid, defaulted = false)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      sid = sid.pointer if sid.respond_to?(:pointer)

      unless SetSecurityDescriptorOwner(security_descriptor, sid, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

set_security_descriptor_sacl(security_descriptor, acl, defaulted = false, present = nil) click to toggle source

    # File lib/chef/win32/security.rb, line 458
    def self.set_security_descriptor_sacl(security_descriptor, acl, defaulted = false, present = nil)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      acl = acl.pointer if acl.respond_to?(:pointer)
      present = !security_descriptor.null? if present == nil

      unless SetSecurityDescriptorSacl(security_descriptor, present, acl, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

with_privileges(*privilege_names) click to toggle source

    # File lib/chef/win32/security.rb, line 468
    def self.with_privileges(*privilege_names)
      # Set privileges
      token = open_process_token(Chef::ReservedNames::Win32::Process.get_current_process, TOKEN_READ | TOKEN_ADJUST_PRIVILEGES)
      old_privileges = token.enable_privileges(*privilege_names)

      # Let the caller do their privileged stuff
      begin
        yield
      ensure
        # Set privileges back to what they were before
        token.adjust_privileges(old_privileges)
      end
    end

### Public Instance Methods

set_security_descriptor_dacl(security_descriptor, acl, defaulted = false, present = nil) click to toggle source

    # File lib/chef/win32/security.rb, line 430
    def set_security_descriptor_dacl(security_descriptor, acl, defaulted = false, present = nil)
      security_descriptor = security_descriptor.pointer if security_descriptor.respond_to?(:pointer)
      acl = acl.pointer if acl.respond_to?(:pointer)
      present = !security_descriptor.null? if present == nil

      unless SetSecurityDescriptorDacl(security_descriptor, present, acl, defaulted)
        Chef::ReservedNames::Win32::Error.raise!
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.