diff options
author | Simo Sorce <idra@samba.org> | 2011-10-18 10:44:52 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-10-18 20:57:16 +0200 |
commit | 605d7d965a33d6a4be632dde9b15abb42801fdaf (patch) | |
tree | 01ae99dca9bf63e666e23bef155b40427f05a30e /source3/passdb/py_passdb.c | |
parent | 94799db9b5d33ded34ad3e934da673a44d48094a (diff) | |
download | samba-605d7d965a33d6a4be632dde9b15abb42801fdaf.tar.gz samba-605d7d965a33d6a4be632dde9b15abb42801fdaf.tar.bz2 samba-605d7d965a33d6a4be632dde9b15abb42801fdaf.zip |
pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/passdb/py_passdb.c')
-rw-r--r-- | source3/passdb/py_passdb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 025e82812c..4c8dbcdbd2 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -2664,7 +2664,8 @@ static PyObject *py_pdb_sid_to_id(pytalloc_Object *self, PyObject *args) TALLOC_CTX *tframe; PyObject *py_sid; struct dom_sid *sid; - union unid_t id; + uid_t uid = -1; + gid_t gid = -1; enum lsa_SidType type; if (!PyArg_ParseTuple(args, "O!:sid_to_id", dom_sid_Type, &py_sid)) { @@ -2680,7 +2681,7 @@ static PyObject *py_pdb_sid_to_id(pytalloc_Object *self, PyObject *args) sid = pytalloc_get_ptr(py_sid); - if (!methods->sid_to_id(methods, sid, &id, &type)) { + if (!methods->sid_to_id(methods, sid, &uid, &gid, &type)) { PyErr_Format(py_pdb_error, "Unable to get id for sid"); talloc_free(tframe); return NULL; @@ -2688,7 +2689,7 @@ static PyObject *py_pdb_sid_to_id(pytalloc_Object *self, PyObject *args) talloc_free(tframe); - return Py_BuildValue("(II)", id.uid, type); + return Py_BuildValue("(II)", (uid != -1)?uid:gid, type); } |