From: Douglas Bagnall Date: Wed, 12 Apr 2023 09:34:47 +0000 (+1200) Subject: librpc/py_security: exception message blames the bad SID X-Git-Tag: talloc-2.4.1~855 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489cdc42c43424949f99ff591bb0ec7454b308db;p=thirdparty%2Fsamba.git librpc/py_security: exception message blames the bad SID It can be useful to know what you're looking for. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/librpc/ndr/py_security.c b/source4/librpc/ndr/py_security.c index b49b258d830..217b7dc19d1 100644 --- a/source4/librpc/ndr/py_security.c +++ b/source4/librpc/ndr/py_security.c @@ -120,7 +120,8 @@ static int py_dom_sid_init(PyObject *self, PyObject *args, PyObject *kwargs) return -1; if (str != NULL && !dom_sid_parse(str, sid)) { - PyErr_SetString(PyExc_ValueError, "Unable to parse string"); + PyErr_Format(PyExc_ValueError, + "Unable to parse string: '%s'", str); return -1; }