From cd3f552f4f632204edc8064a1ad332e703a28e72 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 18 Nov 2011 14:35:56 +1100 Subject: s3-py-passdb: Fix handling of uninitialized gid values Uninitialized gid value is set to -1 and return as such from python passdb api. Autobuild-User: Amitay Isaacs Autobuild-Date: Fri Nov 18 06:18:33 CET 2011 on sn-devel-104 --- source4/scripting/python/samba/tests/samba3.py | 2 +- source4/scripting/python/samba/upgrade.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/python/samba/tests/samba3.py b/source4/scripting/python/samba/tests/samba3.py index 782cf37461..e8852cd5e6 100644 --- a/source4/scripting/python/samba/tests/samba3.py +++ b/source4/scripting/python/samba/tests/samba3.py @@ -151,7 +151,7 @@ class PassdbTestCase(TestCaseInTempDir): def test_get_group(self): group = self.pdb.getgrsid(dom_sid("S-1-5-32-544")) self.assertEquals("Administrators", group.nt_name) - self.assertEquals(4294967295, group.gid) + self.assertEquals(-1, group.gid) self.assertEquals(5, group.sid_name_use) def test_groupsids(self): diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index 11999608aa..bf912018eb 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -674,7 +674,7 @@ Please fix this account before attempting to upgrade again logger.info("Importing groups") for g in grouplist: # Ignore uninitialized groups (gid = -1) - if g.gid != 0xffffffff: + if g.gid != -1: add_idmap_entry(result.idmap, g.sid, g.gid, "ID_TYPE_GID", logger) add_group_from_mapping_entry(result.samdb, g, logger) -- cgit