Skip to content

Commit

Permalink
Merge pull request #88 from pm-syn/master
Browse files Browse the repository at this point in the history
Allow recursive group enumeration for the primary group as well
  • Loading branch information
tiyeuse authored Jul 3, 2024
2 parents fac6d67 + c6ac373 commit 1810f23
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ldeep/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,13 @@ def lookup_groups(dn, leading_sp, already_treated):
pid = result["primaryGroupID"]
results = list(self.engine.query(self.engine.PRIMARY_GROUP_ID(pid)))
if results:
print(results[0]["dn"])
dn = results[0]["dn"]
print(dn)
if recursive:
already_printed.add(dn)
s = lookup_groups(dn, 4, already_printed)
already_printed.union(s)

if len(list(results)) == 0:
error("User {account} does not exists".format(account=account))

Expand Down

0 comments on commit 1810f23

Please sign in to comment.