diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-21 17:59:08 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-21 17:59:08 +0200 |
commit | db30ff4bea11f6612bd68c934ba31387ad99cefc (patch) | |
tree | 57e1b48e01ba4172ead0158259558dc1936e49c1 /source4/param/param.i | |
parent | 61fba825940b03ac954208cc0ead4ed2c0af848a (diff) | |
download | samba-db30ff4bea11f6612bd68c934ba31387ad99cefc.tar.gz samba-db30ff4bea11f6612bd68c934ba31387ad99cefc.tar.bz2 samba-db30ff4bea11f6612bd68c934ba31387ad99cefc.zip |
Load default smb.conf file if none was specified explicitly.
(This used to be commit 8fa23fac516dbf4c8245c1d009e81f02a6341775)
Diffstat (limited to 'source4/param/param.i')
-rw-r--r-- | source4/param/param.i | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/param/param.i b/source4/param/param.i index 77d781d6ff..2f62cb2f16 100644 --- a/source4/param/param.i +++ b/source4/param/param.i @@ -307,6 +307,15 @@ struct loadparm_context *lp_from_py_object(PyObject *py_obj) return lp_ctx; } + if (py_obj == Py_None) { + lp_ctx = loadparm_init(NULL); + if (!lp_load_default(lp_ctx)) { + talloc_free(lp_ctx); + return NULL; + } + return lp_ctx; + } + if (SWIG_ConvertPtr(py_obj, (void *)&lp_ctx, SWIGTYPE_p_loadparm_context, 0 | 0 ) < 0) return NULL; return lp_ctx; |