attempted fix on group shares not appearing (GID not found) (4)

This commit is contained in:
Ludwig Lehnert
2026-02-18 19:57:08 +01:00
parent c4fa01cb0e
commit c340e79ee3
4 changed files with 32 additions and 38 deletions

View File

@@ -386,7 +386,12 @@ def reconcile_db(conn: sqlite3.Connection, ad_groups: List[Dict[str, str]]) -> N
def qualify_group(group_name: str) -> str:
return f'+"{group_name}"'
if "\\" in group_name:
return f'@"{group_name}"'
workgroup = os.getenv("WORKGROUP", "").strip()
if workgroup:
return f'@"{workgroup}\\{group_name}"'
return f'@"{group_name}"'
def is_valid_share_name(share_name: str) -> bool:
@@ -731,7 +736,6 @@ def with_lock() -> bool:
sync_public_directory()
sync_private_directories()
refresh_winbind_cache()
reload_samba()
log("Reconciliation completed")
return True