From: Douglas Bagnall Date: Tue, 9 Jul 2019 11:07:18 +0000 (+1200) Subject: auth/pycreds/encrypt_netr_crypt_password: don't pretend arg is optional X-Git-Tag: tdb-1.4.2~575 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5e8a5e05bcb89a3fc36044ce89ac49df2f00d03;p=thirdparty%2Fsamba.git auth/pycreds/encrypt_netr_crypt_password: don't pretend arg is optional The "|O" signature is saying the password argument is optional, which makes no sense in terms of the funxtion and immediately leads to a TypeError (or until last commit, segfault). Removing the "|" leaves it with a TypeError, but it is better worded and faster. Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index 91e9276473d..446f30970a2 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -906,7 +906,7 @@ static PyObject *py_creds_encrypt_netr_crypt_password(PyObject *self, return NULL; } - if (!PyArg_ParseTuple(args, "|O", &py_cp)) { + if (!PyArg_ParseTuple(args, "O", &py_cp)) { return NULL; }