diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-11-18 14:35:56 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2011-11-18 06:18:33 +0100 |
commit | cd3f552f4f632204edc8064a1ad332e703a28e72 (patch) | |
tree | 886e3033ea3de5992173aaf31b7a1e1a344367ad /source4/scripting | |
parent | 9318e00a1fab1e6eda6495c44b69d95a980b1e5e (diff) | |
download | samba-cd3f552f4f632204edc8064a1ad332e703a28e72.tar.gz samba-cd3f552f4f632204edc8064a1ad332e703a28e72.tar.bz2 samba-cd3f552f4f632204edc8064a1ad332e703a28e72.zip |
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 <amitay@samba.org>
Autobuild-Date: Fri Nov 18 06:18:33 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/tests/samba3.py | 2 | ||||
-rw-r--r-- | source4/scripting/python/samba/upgrade.py | 2 |
2 files changed, 2 insertions, 2 deletions
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) |