From: Noel Power Date: Fri, 18 May 2018 16:15:44 +0000 (+0100) Subject: s4/librpc/ndr: allow GUID to accept unicode also X-Git-Tag: ldb-1.5.0~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883c3d8d646135c182db3c6f4085edb052929bcf;p=thirdparty%2Fsamba.git s4/librpc/ndr: allow GUID to accept unicode also This needed since _GUID_string method change (in source4/torture/drs/python/drs_base.py) which makes use use a unicode guid at times now Signed-off-by: Noel Power Reviewed-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/source4/librpc/ndr/py_misc.c b/source4/librpc/ndr/py_misc.c index 849a11460a4..6c0b8b2af14 100644 --- a/source4/librpc/ndr/py_misc.c +++ b/source4/librpc/ndr/py_misc.c @@ -97,7 +97,7 @@ static int py_GUID_init(PyObject *self, PyObject *args, PyObject *kwargs) DATA_BLOB guid_val; Py_ssize_t _size; - if (!IsPy3BytesOrString(str)) { + if (!IsPy3BytesOrString(str) && !PyUnicode_Check(str)) { PyErr_SetString(PyExc_TypeError, "Expected a string or bytes argument to GUID()"); return -1; }