From: Andreas Schneider Date: Mon, 12 Nov 2018 17:27:44 +0000 (+0100) Subject: s3:passdb: Use discard_const_p() in py_passdb X-Git-Tag: tdb-1.3.17~756 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a272b83af6958a436821daacaa3876dd991e6ba;p=thirdparty%2Fsamba.git s3:passdb: Use discard_const_p() in py_passdb Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Nov 14 11:46:06 CET 2018 on sn-devel-144 --- diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 1bcf3f667ec..3d8012f2c06 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -3081,10 +3081,10 @@ static PyObject *py_pdb_set_trusted_domain(PyObject *self, PyObject *args) } py_tmp = PyDict_GetItemString(py_td_info, "domain_name"); - td_info.domain_name = PyStr_AsString(py_tmp); + td_info.domain_name = discard_const_p(char, PyStr_AsString(py_tmp)); py_tmp = PyDict_GetItemString(py_td_info, "netbios_name"); - td_info.netbios_name = PyStr_AsString(py_tmp); + td_info.netbios_name = discard_const_p(char, PyStr_AsString(py_tmp)); py_tmp = PyDict_GetItemString(py_td_info, "security_identifier"); td_info.security_identifier = *pytalloc_get_type(py_tmp, struct dom_sid);