summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials.i
diff options
context:
space:
mode:
Diffstat (limited to 'source4/auth/credentials/credentials.i')
-rw-r--r--source4/auth/credentials/credentials.i17
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/auth/credentials/credentials.i b/source4/auth/credentials/credentials.i
index 8f09ff4b18..ee09b43a75 100644
--- a/source4/auth/credentials/credentials.i
+++ b/source4/auth/credentials/credentials.i
@@ -95,3 +95,20 @@ typedef struct cli_credentials {
bool wrong_password(void);
}
} cli_credentials;
+
+%{
+struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj)
+{
+ struct cli_credentials *ret;
+
+ if (py_obj == Py_None) {
+ return cli_credentials_init_anon(NULL);
+ }
+
+ if (SWIG_ConvertPtr(py_obj, (void *)&ret, SWIGTYPE_p_cli_credentials, 0 | 0 ) < 0) {
+ return NULL;
+ }
+ return ret;
+}
+
+%}