diff --git a/vm/extract_acl.py b/vm/extract_acl.py index b83cdb8..0005e27 100644 --- a/vm/extract_acl.py +++ b/vm/extract_acl.py @@ -3,7 +3,6 @@ import json import subprocess import sys -import threading def extract_acls(vmid_min, vmid_max, output_file, remove_acl=False, append=False): print("Fetching ACLs...") @@ -34,18 +33,10 @@ def extract_acls(vmid_min, vmid_max, output_file, remove_acl=False, append=False f.write(f"{path} {user} {role}\n") if (remove_acl): - subprocess.run(["pveum", "acl", "delete", path, users, "--roles", roles]) + subprocess.run(["pveum", "acl", "delete", path, "--users", users, "--roles", roles]) - # Process each ACL in background - threads = [] for acl_entry in acls: - thread = threading.Thread(target=process_acl, args=(acl_entry,)) - thread.start() - threads.append(thread) - - # Wait for all threads to finish - for thread in threads: - thread.join() + process_acl(acl_entry) print(f"ACLs extracted and saved to {output_file}")