mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #35054 from lubyou/fix-win_dacl-disable_inheritance
Only fail user lookup is the user parameter is required
This commit is contained in:
commit
f34bb7a8de
1 changed files with 3 additions and 5 deletions
|
@ -347,8 +347,7 @@ def get(path, objectType, user=None):
|
|||
'ACLs': []}
|
||||
|
||||
sidRet = _getUserSid(user)
|
||||
if not sidRet['result']:
|
||||
return sidRet
|
||||
|
||||
if path and objectType:
|
||||
dc = daclConstants()
|
||||
objectTypeBit = dc.getObjectTypeBit(objectType)
|
||||
|
@ -645,8 +644,6 @@ def check_inheritance(path, objectType, user=None):
|
|||
'comment': ''}
|
||||
|
||||
sidRet = _getUserSid(user)
|
||||
if not sidRet['result']:
|
||||
return sidRet
|
||||
|
||||
dc = daclConstants()
|
||||
objectType = dc.getObjectTypeBit(objectType)
|
||||
|
@ -665,7 +662,8 @@ def check_inheritance(path, objectType, user=None):
|
|||
if (ace[0][1] & win32security.INHERITED_ACE) == win32security.INHERITED_ACE:
|
||||
if not sidRet['sid'] or ace[2] == sidRet['sid']:
|
||||
ret['Inheritance'] = True
|
||||
return ret
|
||||
break
|
||||
|
||||
ret['result'] = True
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue