summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/upgrade.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index ae9fdab4cb..98800196d9 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -602,6 +602,16 @@ Please fix this account before attempting to upgrade again
logger.error(" %s" % name)
raise ProvisioningError("Please remove common user/group names before upgrade.")
+ # Check for same user sid/group sid
+ group_sids = set(map(lambda g: str(g.sid), grouplist))
+ user_sids = set(map(lambda u: "%s-%u" % (domainsid, u['rid']), userlist))
+ common_sids = group_sids.intersection(user_sids)
+ if common_sids:
+ logger.error("Following sids are both user and group sids:")
+ for sid in common_sids:
+ logger.error(" %s" % str(sid))
+ raise ProvisioningError("Please remove duplicate sid entries before upgrade.")
+
# Do full provision
result = provision(logger, session_info, None,
targetdir=targetdir, realm=realm, domain=domainname,