mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
pysecurity: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
186fff5fc3
commit
6f4b2cc965
@ -114,18 +114,17 @@ static int py_dom_sid_cmp(PyObject *py_self, PyObject *py_other)
|
|||||||
static PyObject *py_dom_sid_str(PyObject *py_self)
|
static PyObject *py_dom_sid_str(PyObject *py_self)
|
||||||
{
|
{
|
||||||
struct dom_sid *self = pytalloc_get_ptr(py_self);
|
struct dom_sid *self = pytalloc_get_ptr(py_self);
|
||||||
char *str = dom_sid_string(NULL, self);
|
struct dom_sid_buf buf;
|
||||||
PyObject *ret = PyStr_FromString(str);
|
PyObject *ret = PyStr_FromString(dom_sid_str_buf(self, &buf));
|
||||||
talloc_free(str);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *py_dom_sid_repr(PyObject *py_self)
|
static PyObject *py_dom_sid_repr(PyObject *py_self)
|
||||||
{
|
{
|
||||||
struct dom_sid *self = pytalloc_get_ptr(py_self);
|
struct dom_sid *self = pytalloc_get_ptr(py_self);
|
||||||
char *str = dom_sid_string(NULL, self);
|
struct dom_sid_buf buf;
|
||||||
PyObject *ret = PyStr_FromFormat("dom_sid('%s')", str);
|
PyObject *ret = PyStr_FromFormat(
|
||||||
talloc_free(str);
|
"dom_sid('%s')", dom_sid_str_buf(self, &buf));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user