diff options
author | Andreas Schneider <asn@samba.org> | 2021-05-04 11:02:02 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-06-29 02:19:35 +0000 |
commit | cdf8859b906bab0461256c7f773aba23227642df (patch) | |
tree | 0923574394047406c22f3c2c0fb77b779995595e | |
parent | 1d6dfd5b4d7790308f9c704305d7ab8aa5cd5903 (diff) | |
download | samba-cdf8859b906bab0461256c7f773aba23227642df.tar.gz |
auth:creds: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | auth/credentials/pycredentials.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index 566405a08ee..7405704906a 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -622,6 +622,7 @@ static PyObject *py_creds_set_conf(PyObject *self, PyObject *args) struct loadparm_context *lp_ctx; TALLOC_CTX *mem_ctx; struct cli_credentials *creds; + bool ok; creds = PyCredentials_AsCliCredentials(self); if (creds == NULL) { @@ -645,9 +646,11 @@ static PyObject *py_creds_set_conf(PyObject *self, PyObject *args) return NULL; } - cli_credentials_set_conf(creds, lp_ctx); - + ok = cli_credentials_set_conf(creds, lp_ctx); talloc_free(mem_ctx); + if (!ok) { + return NULL; + } Py_RETURN_NONE; } |