diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2019-07-09 23:07:18 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-07-22 22:20:26 +0000 |
commit | a5e8a5e05bcb89a3fc36044ce89ac49df2f00d03 (patch) | |
tree | 0bcb612c38202b9e534769ae6871f87d3693bd79 /auth | |
parent | f8fb6f326129267c7742947943df3f920c8cb54f (diff) | |
download | samba-a5e8a5e05bcb89a3fc36044ce89ac49df2f00d03.tar.gz |
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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/credentials/pycredentials.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |