[go: nahoru, domu]

Skip to content

Commit

Permalink
Change desiredAccess to MAXIMUM_ALLOWED when getting user_handle in n…
Browse files Browse the repository at this point in the history
…et.py. We could receive ACCESS_DENIED if authenticated user was not admin with previous value (USER_ALL_ACCESS) (fortra#1708)
  • Loading branch information
gabrielg5 committed Mar 4, 2024
1 parent 78e0149 commit 3ee3bb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _get_object_rid(self, domain_handle, object_name):

def _get_user_handle(self, domain_handle, username):
user_rid = self._get_object_rid(domain_handle, username)
response = samr.hSamrOpenUser(self._dce, domain_handle, samr.USER_ALL_ACCESS, user_rid)
response = samr.hSamrOpenUser(self._dce, domain_handle, samr.MAXIMUM_ALLOWED, user_rid)
return response['UserHandle']

def _get_group_handle(self, domain_handle, alias_name):
Expand Down

0 comments on commit 3ee3bb4

Please sign in to comment.