mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #38819 from twangboy/salt_perms_2016.11
Remove `Users` from c:\salt [DO NOT MERGE FORWARD]
This commit is contained in:
commit
4913c4f90c
@ -215,7 +215,6 @@ def set_path_permissions(path):
|
||||
'''
|
||||
# TODO: Need to make this more generic, maybe a win_dacl utility
|
||||
admins = win32security.ConvertStringSidToSid('S-1-5-32-544')
|
||||
user = win32security.ConvertStringSidToSid('S-1-5-32-545')
|
||||
system = win32security.ConvertStringSidToSid('S-1-5-18')
|
||||
owner = win32security.ConvertStringSidToSid('S-1-3-4')
|
||||
|
||||
@ -225,14 +224,10 @@ def set_path_permissions(path):
|
||||
inheritance = win32security.CONTAINER_INHERIT_ACE |\
|
||||
win32security.OBJECT_INHERIT_ACE
|
||||
full_access = ntsecuritycon.GENERIC_ALL
|
||||
user_access = ntsecuritycon.GENERIC_READ | \
|
||||
ntsecuritycon.GENERIC_EXECUTE
|
||||
|
||||
dacl.AddAccessAllowedAceEx(revision, inheritance, full_access, admins)
|
||||
dacl.AddAccessAllowedAceEx(revision, inheritance, full_access, system)
|
||||
dacl.AddAccessAllowedAceEx(revision, inheritance, full_access, owner)
|
||||
if 'pki' not in path:
|
||||
dacl.AddAccessAllowedAceEx(revision, inheritance, user_access, user)
|
||||
|
||||
try:
|
||||
win32security.SetNamedSecurityInfo(
|
||||
|
Loading…
Reference in New Issue
Block a user