summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-19 09:59:40 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-19 09:59:40 +1000
commita5905bfb39e297ed6ac453faa5518ba5ff47640a (patch)
tree4190df71d4f436d253df51ff34e251d792a1d207 /source4
parent916297e0454317cbfe400b2d7fa60073bcccb8d6 (diff)
downloadsamba-a5905bfb39e297ed6ac453faa5518ba5ff47640a.tar.gz
samba-a5905bfb39e297ed6ac453faa5518ba5ff47640a.tar.bz2
samba-a5905bfb39e297ed6ac453faa5518ba5ff47640a.zip
s4-s3upgrade: Ignore (with warning) groups that are listed but we cannot list members for
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/upgrade.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index b2fb51e3b7..ab9d9374d5 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -534,11 +534,18 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=Fa
# Get members for each group/alias
if group.sid_name_use == lsa.SID_NAME_ALIAS:
- members = s3db.enum_aliasmem(group.sid)
+ try:
+ members = s3db.enum_aliasmem(group.sid)
+ except passdb.error:
+ logger.warn("Ignoring group '%s' %s listed but then not found: %s",
+ group.nt_name, group.sid, passdb.error)
+ continue
elif group.sid_name_use == lsa.SID_NAME_DOM_GRP:
try:
members = s3db.enum_group_members(group.sid)
except passdb.error:
+ logger.warn("Ignoring group '%s' %s listed but then not found: %s",
+ group.nt_name, group.sid, passdb.error)
continue
groupmembers[group.nt_name] = members
elif group.sid_name_use == lsa.SID_NAME_WKN_GRP:
@@ -548,7 +555,12 @@ def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=Fa
group.nt_name)
continue
# A number of buggy databases mix up well known groups and aliases.
- members = s3db.enum_aliasmem(group.sid)
+ try:
+ members = s3db.enum_aliasmem(group.sid)
+ except passdb.error:
+ logger.warn("Ignoring group '%s' %s listed but then not found: %s",
+ group.nt_name, group.sid, passdb.error)
+ continue
else:
logger.warn("Ignoring group '%s' with sid_name_use=%d",
group.nt_name, group.sid_name_use)