summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/param.i2
-rw-r--r--source4/param/param_wrap.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/source4/param/param.i b/source4/param/param.i
index 375c3d0da4..353fa3ced6 100644
--- a/source4/param/param.i
+++ b/source4/param/param.i
@@ -59,6 +59,8 @@ typedef struct loadparm_context {
bool is_myname(const char *name) { return lp_is_myname($self, name); }
int use(struct param_context *param_ctx) { return param_use($self, param_ctx); }
bool set(const char *parm_name, const char *parm_value) {
+ if (parm_value == NULL)
+ return false;
return lp_set_cmdline($self, parm_name, parm_value);
}
diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c
index 5f7ff880ff..ca9fbb77b8 100644
--- a/source4/param/param_wrap.c
+++ b/source4/param/param_wrap.c
@@ -2643,6 +2643,8 @@ SWIGINTERN bool loadparm_context_is_mydomain(loadparm_context *self,char const *
SWIGINTERN bool loadparm_context_is_myname(loadparm_context *self,char const *name){ return lp_is_myname(self, name); }
SWIGINTERN int loadparm_context_use(loadparm_context *self,struct param_context *param_ctx){ return param_use(self, param_ctx); }
SWIGINTERN bool loadparm_context_set(loadparm_context *self,char const *parm_name,char const *parm_value){
+ if (parm_value == NULL)
+ return false;
return lp_set_cmdline(self, parm_name, parm_value);
}
SWIGINTERN PyObject *loadparm_context_get(loadparm_context *self,char const *param_name,char const *service_name){