summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-16 14:12:57 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-16 16:08:46 +1000
commitefb37a5b8c3667c948e1ec9815a1c9ac575a4456 (patch)
treeb8ece979a9aa2f7d41dd2a2304340faf2df18441 /source4
parent6a82997285db9aff0085e6a54e58a34a97152ebb (diff)
downloadsamba-efb37a5b8c3667c948e1ec9815a1c9ac575a4456.tar.gz
samba-efb37a5b8c3667c948e1ec9815a1c9ac575a4456.tar.bz2
samba-efb37a5b8c3667c948e1ec9815a1c9ac575a4456.zip
s4-pycredentials: expose forwardable setting via python
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/pycredentials.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index 86ce63ef98..7c860b041d 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -193,6 +193,16 @@ static PyObject *py_creds_set_kerberos_state(py_talloc_Object *self, PyObject *a
Py_RETURN_NONE;
}
+static PyObject *py_creds_set_krb_forwardable(py_talloc_Object *self, PyObject *args)
+{
+ int state;
+ if (!PyArg_ParseTuple(args, "i", &state))
+ return NULL;
+
+ cli_credentials_set_krb_forwardable(PyCredentials_AsCliCredentials(self), state);
+ Py_RETURN_NONE;
+}
+
static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args)
{
PyObject *py_lp_ctx = Py_None;
@@ -364,6 +374,8 @@ static PyMethodDef py_creds_methods[] = {
NULL },
{ "set_kerberos_state", (PyCFunction)py_creds_set_kerberos_state, METH_VARARGS,
NULL },
+ { "set_krb_forwardable", (PyCFunction)py_creds_set_krb_forwardable, METH_VARARGS,
+ NULL },
{ "guess", (PyCFunction)py_creds_guess, METH_VARARGS, NULL },
{ "set_machine_account", (PyCFunction)py_creds_set_machine_account, METH_VARARGS, NULL },
{ "get_named_ccache", (PyCFunction)py_creds_get_named_ccache, METH_VARARGS, NULL },
@@ -407,6 +419,10 @@ void initcredentials(void)
PyModule_AddObject(m, "DONT_USE_KERBEROS", PyInt_FromLong(CRED_DONT_USE_KERBEROS));
PyModule_AddObject(m, "MUST_USE_KERBEROS", PyInt_FromLong(CRED_MUST_USE_KERBEROS));
+ PyModule_AddObject(m, "AUTO_KRB_FORWARDABLE", PyInt_FromLong(CRED_AUTO_KRB_FORWARDABLE));
+ PyModule_AddObject(m, "NO_KRB_FORWARDABLE", PyInt_FromLong(CRED_NO_KRB_FORWARDABLE));
+ PyModule_AddObject(m, "FORCE_KRB_FORWARDABLE", PyInt_FromLong(CRED_FORCE_KRB_FORWARDABLE));
+
Py_INCREF(&PyCredentials);
PyModule_AddObject(m, "Credentials", (PyObject *)&PyCredentials);
Py_INCREF(&PyCredentialCacheContainer);