summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/py_passdb.c2
-rw-r--r--source4/scripting/python/samba/tests/samba3.py2
-rw-r--r--source4/scripting/python/samba/upgrade.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index 39ecf86094..46f2e90f3d 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -975,7 +975,7 @@ static PyObject *py_groupmap_get_gid(PyObject *obj, void *closure)
GROUP_MAP *group_map = (GROUP_MAP *)pytalloc_get_ptr(obj);
PyObject *py_gid;
- py_gid = PyInt_FromLong(group_map->gid);
+ py_gid = Py_BuildValue("i", group_map->gid);
return py_gid;
}
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)