summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/param.i9
-rw-r--r--source4/param/param_wrap.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/source4/param/param.i b/source4/param/param.i
index 6158c92f80..c085ca2f05 100644
--- a/source4/param/param.i
+++ b/source4/param/param.i
@@ -344,4 +344,13 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
return lp_ctx;
}
+struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
+{
+ struct loadparm_context *ret;
+ ret = loadparm_init(mem_ctx);
+ if (!lp_load_default(ret))
+ return NULL;
+ return ret;
+}
+
%}
diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c
index 23b3c17623..8f4f529532 100644
--- a/source4/param/param_wrap.c
+++ b/source4/param/param_wrap.c
@@ -2814,6 +2814,15 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
return lp_ctx;
}
+struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
+{
+ struct loadparm_context *ret;
+ ret = loadparm_init(mem_ctx);
+ if (!lp_load_default(ret))
+ return NULL;
+ return ret;
+}
+
#ifdef __cplusplus
extern "C" {