diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-04 08:35:04 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-04 08:35:04 -0800 |
commit | 938c37c2dd5bff3b888540ae1ae4d2e51b3208d8 (patch) | |
tree | 2ee587d74840857a1aaffc09692781d64ebd85ef /lib/chef/win32/api/security.rb | |
parent | dfeb0a2f8888ea8e1f1860e3da7ad7a1a4dac56f (diff) | |
download | chef-lcg/whitespace-style.tar.gz |
whitespace fixeslcg/whitespace-style
5533 Style/SpaceInsideHashLiteralBraces
2619 Style/SpaceAroundOperators
2288 Style/EmptyLinesAroundBlockBody
2012 Style/SpaceInsideBlockBraces
1444 Style/AlignHash
1395 Style/SpaceAfterComma
1382 Style/SpaceAroundEqualsInParameterDefault
800 Style/EmptyLinesAroundClassBody
396 Style/IndentationConsistency
354 Style/ExtraSpacing
310 Style/SpaceBeforeBlockBraces
309 Style/EmptyLines
304 Style/TrailingWhitespace
241 Style/MultilineOperationIndentation
230 Style/TrailingBlankLines
219 Style/EmptyLinesAroundModuleBody
212 Style/IndentHash
147 Style/IndentationWidth
120 Style/EmptyLineBetweenDefs
107 Style/SpaceAroundBlockParameters
63 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/win32/api/security.rb')
-rw-r--r-- | lib/chef/win32/api/security.rb | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb index 61c65971be..380d2fe283 100644 --- a/lib/chef/win32/api/security.rb +++ b/lib/chef/win32/api/security.rb @@ -136,20 +136,10 @@ class Chef SYNCHRONIZE | 0x1FF FILE_GENERIC_READ = STANDARD_RIGHTS_READ | - FILE_READ_DATA | - FILE_READ_ATTRIBUTES | - FILE_READ_EA | - SYNCHRONIZE - 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 + FILE_READ_DATA | FILE_READ_ATTRIBUTES | + FILE_READ_EA | SYNCHRONIZE + 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 # Access Token Rights (for OpenProcessToken) # Access Rights for Access-Token Objects (used in OpenProcessToken) TOKEN_ASSIGN_PRIMARY = 0x0001 @@ -173,9 +163,7 @@ class Chef SE_PRIVILEGE_REMOVED = 0X00000004 SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000 SE_PRIVILEGE_VALID_ATTRIBUTES = SE_PRIVILEGE_ENABLED_BY_DEFAULT | - SE_PRIVILEGE_ENABLED | - SE_PRIVILEGE_REMOVED | - SE_PRIVILEGE_USED_FOR_ACCESS + SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_REMOVED | SE_PRIVILEGE_USED_FOR_ACCESS # Minimum size of a SECURITY_DESCRIPTOR. TODO: this is probably platform dependent. # Make it work on 64 bit. @@ -315,7 +303,6 @@ class Chef :SecurityDelegation, ] - # SECURITY_DESCRIPTOR is an opaque structure whose contents can vary. Pass the # pointer around and free it with LocalFree. # http://msdn.microsoft.com/en-us/library/windows/desktop/aa379561(v=vs.85).aspx @@ -384,7 +371,7 @@ class Chef :Privileges, LUID_AND_ATTRIBUTES def self.size_with_privileges(num_privileges) - offset_of(:Privileges) + LUID_AND_ATTRIBUTES.size*num_privileges + offset_of(:Privileges) + LUID_AND_ATTRIBUTES.size * num_privileges end def size_with_privileges @@ -431,7 +418,7 @@ class Chef safe_attach_function :GetAce, [ :pointer, :DWORD, :pointer ], :BOOL safe_attach_function :GetFileSecurityW, [:LPCWSTR, :DWORD, :pointer, :DWORD, :pointer], :BOOL safe_attach_function :GetLengthSid, [ :pointer ], :DWORD - safe_attach_function :GetNamedSecurityInfoW, [ :LPWSTR, :SE_OBJECT_TYPE, :DWORD, :pointer, :pointer, :pointer, :pointer, :pointer ], :DWORD + safe_attach_function :GetNamedSecurityInfoW, [ :LPWSTR, :SE_OBJECT_TYPE, :DWORD, :pointer, :pointer, :pointer, :pointer, :pointer ], :DWORD safe_attach_function :GetSecurityDescriptorControl, [ :pointer, :PWORD, :LPDWORD], :BOOL safe_attach_function :GetSecurityDescriptorDacl, [ :pointer, :LPBOOL, :pointer, :LPBOOL ], :BOOL safe_attach_function :GetSecurityDescriptorGroup, [ :pointer, :pointer, :LPBOOL], :BOOL @@ -466,7 +453,6 @@ class Chef safe_attach_function :SetSecurityDescriptorSacl, [ :pointer, :BOOL, :pointer, :BOOL ], :BOOL safe_attach_function :GetTokenInformation, [ :HANDLE, :TOKEN_INFORMATION_CLASS, :pointer, :DWORD, :PDWORD ], :BOOL safe_attach_function :LogonUserW, [:LPTSTR, :LPTSTR, :LPTSTR, :DWORD, :DWORD, :PHANDLE], :BOOL - end end end |