Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Jul 8, 2024
1 parent 20574de commit 5463e82
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/middlewared/middlewared/plugins/smb_/groupmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@

from middlewared.service import Service, job, private
from middlewared.service_exception import CallError
from middlewared.utils import run
from middlewared.utils.directoryservices.constants import IDType
from middlewared.utils.sid import (
BASE_RID_USER,
db_id_to_rid,
get_domain_rid,
lsa_sidtype,
DomainRid
)
from middlewared.utils.tdb import (
get_tdb_handle,
TDBDataType,
TDBPathType,
TDBOptions,
)
from middlewared.plugins.smb_.constants import SMBBuiltin, SMBPath
from middlewared.plugins.smb_.util_groupmap import (
delete_groupmap_entry,
insert_groupmap_entry,
insert_groupmap_entries,
query_groupmap_entries,
GroupmapFile,
GroupmapEntryType,
Expand All @@ -31,7 +37,7 @@


def clear_winbind_idmap_cache():
with get_tdb_handle(WINBIND_IDMAP_FILE, WINBIND_IDMAP_TDB_OPTIONS) as hdl:
with get_tdb_handle(WINBIND_IDMAP_CACHE, WINBIND_IDMAP_TDB_OPTIONS) as hdl:
return hdl.clear()


Expand Down Expand Up @@ -304,7 +310,7 @@ def sync_builtins(self, to_add):
sid_type=lsa_sidtype.ALIAS,
name=b.nt_name,
comment=''
)
))

return self.validate_groupmap_hwm(low_range)

Expand All @@ -316,7 +322,7 @@ def synchronize_group_mappings(self, job, bypass_sentinel_check=False):
1) ensures that group_mapping.tdb has all required groupmap entries
2) ensures that builtin SIDs S-1-5-32-544, S-1-5-32-545, and S-1-5-32-546
exist and are deterministically mapped to expected GIDs
3) ensures that all expected foreign aliases for builtin SIDs above exist.
3) ensures that all expected foreign aliases for builtin SIDs above exist.
4) flush various caches if required.
"""
entries = []
Expand Down

0 comments on commit 5463e82

Please sign in to comment.