From bfa951db975417facda3e92d9b1075616e6c7581 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 30 Jan 2012 12:13:28 +1100 Subject: s4-s3-upgrade: Check if there are duplicate sids for users and groups Autobuild-User: Amitay Isaacs Autobuild-Date: Tue Jan 31 02:23:17 CET 2012 on sn-devel-104 --- source4/scripting/python/samba/upgrade.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/scripting') 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:") -- cgit