summaryrefslogtreecommitdiff
path: root/source4/scripting/python/misc.i
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python/misc.i')
-rw-r--r--source4/scripting/python/misc.i37
1 files changed, 36 insertions, 1 deletions
diff --git a/source4/scripting/python/misc.i b/source4/scripting/python/misc.i
index 088522320e..3af10dfce9 100644
--- a/source4/scripting/python/misc.i
+++ b/source4/scripting/python/misc.i
@@ -21,12 +21,47 @@
%{
#include "includes.h"
#include "ldb.h"
-#include "auth/credentials/credentials.h"
+#include "param/param.h"
+#include "dsdb/samdb/samdb.h"
+#include "lib/ldb-samba/ldif_handlers.h"
%}
%import "stdint.i"
+%include "exception.i"
%import "../../lib/talloc/talloc.i"
+%import "../../lib/ldb/ldb.i"
+%import "../../auth/credentials/credentials.i"
+%import "../../param/param.i"
+%import "../../libcli/security/security.i"
+%import "../../libcli/util/errors.i"
%rename(random_password) generate_random_str;
char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
+%inline %{
+void ldb_set_credentials(struct ldb_context *ldb, struct cli_credentials *creds)
+{
+ ldb_set_opaque(ldb, "credentials", creds);
+}
+
+void ldb_set_session_info(struct ldb_context *ldb, struct auth_session_info *session_info)
+{
+ ldb_set_opaque(ldb, "sessionInfo", session_info);
+}
+
+void ldb_set_loadparm(struct ldb_context *ldb, struct loadparm_context *lp_ctx)
+{
+ ldb_set_opaque(ldb, "loadparm", lp_ctx);
+}
+
+%}
+
+bool samdb_set_domain_sid(struct ldb_context *ldb,
+ const struct dom_sid *dom_sid_in);
+
+WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf, const char *df);
+
+%rename(version) samba_version_string;
+const char *samba_version_string(void);
+int dsdb_set_global_schema(struct ldb_context *ldb);
+int ldb_register_samba_handlers(struct ldb_context *ldb);