summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-05-02 21:40:39 +0000
committerAndrew Bartlett <abartlet@samba.org>2018-05-12 02:09:28 +0200
commit656ec98e5b248f9107af5713495e4aeca17e3155 (patch)
treeb3a8f102f96dec6b765152b5f49751c668c20ab0 /auth
parent6a6d14248d6a4f4ebc92e3ff6529fe9f82fb8388 (diff)
downloadsamba-656ec98e5b248f9107af5713495e4aeca17e3155.tar.gz
pycredentials: add py_creds_get_secure_channel_type
We have only set, need get. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/pycredentials.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c
index 68bb3060a99..c626e3fa8a0 100644
--- a/auth/credentials/pycredentials.c
+++ b/auth/credentials/pycredentials.c
@@ -680,6 +680,16 @@ static PyObject *py_creds_set_secure_channel_type(PyObject *self, PyObject *args
Py_RETURN_NONE;
}
+static PyObject *py_creds_get_secure_channel_type(PyObject *self, PyObject *args)
+{
+ enum netr_SchannelType channel_type = SEC_CHAN_NULL;
+
+ channel_type = cli_credentials_get_secure_channel_type(
+ PyCredentials_AsCliCredentials(self));
+
+ return PyInt_FromLong(channel_type);
+}
+
static PyObject *py_creds_encrypt_netr_crypt_password(PyObject *self,
PyObject *args)
{
@@ -815,6 +825,8 @@ static PyMethodDef py_creds_methods[] = {
"Get a new client NETLOGON_AUTHENTICATOR"},
{ "set_secure_channel_type", py_creds_set_secure_channel_type,
METH_VARARGS, NULL },
+ { "get_secure_channel_type", py_creds_get_secure_channel_type,
+ METH_VARARGS },
{ "encrypt_netr_crypt_password",
py_creds_encrypt_netr_crypt_password,
METH_VARARGS,