diff options
author | vijaymmali1990 <vijay.mali@msystechnologies.com> | 2019-02-12 03:31:02 -0800 |
---|---|---|
committer | vijaymmali1990 <vijay.mali@msystechnologies.com> | 2019-02-12 04:33:32 -0800 |
commit | 3e2c9bcfb0423dce05a1e29f11ddef3f4f562713 (patch) | |
tree | f81ac839ed0bb39bec728c156604eed77b8c5bc0 /lib/chef/win32 | |
parent | 7658fba8df362c5674008ab6a2852592b6ec9cd1 (diff) | |
download | chef-3e2c9bcfb0423dce05a1e29f11ddef3f4f562713.tar.gz |
Minor fixes as per the review comments
- Using proper verbiage for constant SUBFOLDERS_AND_FILES_ONLY
- Source
https://metacpan.org/pod/Win32::Security::ACE#dbmAceFlags
- Minor DRY up and Fixes
- Ensured chefstyle
Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
Diffstat (limited to 'lib/chef/win32')
-rw-r--r-- | lib/chef/win32/api/security.rb | 2 | ||||
-rw-r--r-- | lib/chef/win32/security/ace.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb index bac4ab5450..5c3dd69c3e 100644 --- a/lib/chef/win32/api/security.rb +++ b/lib/chef/win32/api/security.rb @@ -115,7 +115,6 @@ class Chef STANDARD_RIGHTS_EXECUTE = READ_CONTROL STANDARD_RIGHTS_ALL = 0x001F0000 SPECIFIC_RIGHTS_ALL = 0x0000FFFF - # Access System Security Right ACCESS_SYSTEM_SECURITY = 0x01000000 # File/Directory Specific Rights @@ -142,6 +141,7 @@ class Chef FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE WRITE = FILE_WRITE_DATA | FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA + SUBFOLDERS_AND_FILES_ONLY = INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE # Access Token Rights (for OpenProcessToken) # Access Rights for Access-Token Objects (used in OpenProcessToken) TOKEN_ASSIGN_PRIMARY = 0x0001 diff --git a/lib/chef/win32/security/ace.rb b/lib/chef/win32/security/ace.rb index ba81c44269..d593513983 100644 --- a/lib/chef/win32/security/ace.rb +++ b/lib/chef/win32/security/ace.rb @@ -113,7 +113,7 @@ class Chef struct[:AceType] = type struct[:AceFlags] = flags struct[:AceSize] = size_needed - struct[:Mask] = mask == Security::GENERIC_WRITE ? Security::WRITE : mask + struct[:Mask] = mask Chef::ReservedNames::Win32::Memory.memcpy(struct.pointer + struct.offset_of(:SidStart), sid.pointer, sid.size) ACE.new(struct.pointer) end |