summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-01-30 12:13:28 +1100
committerAmitay Isaacs <amitay@samba.org>2012-01-31 02:23:17 +0100
commitbfa951db975417facda3e92d9b1075616e6c7581 (patch)
treea4a61595112259b79bc5ce7fe24e6e9b493abe23 /source4/scripting
parent449ca7575904e4ed78f2696bb16cef5143761bbc (diff)
downloadsamba-bfa951db975417facda3e92d9b1075616e6c7581.tar.gz
samba-bfa951db975417facda3e92d9b1075616e6c7581.tar.bz2
samba-bfa951db975417facda3e92d9b1075616e6c7581.zip
s4-s3-upgrade: Check if there are duplicate sids for users and groups
Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Jan 31 02:23:17 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/upgrade.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index e9f72e9a6e..850035b9e9 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -617,7 +617,11 @@ Please fix this account before attempting to upgrade again
# Check for same user sid/group sid
group_sids = set([str(g.sid) for g in grouplist])
+ if len(grouplist) != len(group_sids):
+ raise ProvisioningError("Please remove duplicate group sid entries before upgrade.")
user_sids = set(["%s-%u" % (domainsid, u['rid']) for u in userlist])
+ if len(userlist) != len(user_sids):
+ raise ProvisioningError("Please remove duplicate user sid entries before upgrade.")
common_sids = group_sids.intersection(user_sids)
if common_sids:
logger.error("Following sids are both user and group sids:")