diff options
author | Lars Müller <lmuelle@samba.org> | 2006-04-05 07:44:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:54 -0500 |
commit | 52f4dfa6fcc60eb36f7f59747387fd10855046cd (patch) | |
tree | 218512d1d5ffa95a891f90df8f104b4ff400cc61 | |
parent | e9488049c153aca4fe3ae034c483b15078fdc40f (diff) | |
download | samba-52f4dfa6fcc60eb36f7f59747387fd10855046cd.tar.gz samba-52f4dfa6fcc60eb36f7f59747387fd10855046cd.tar.bz2 samba-52f4dfa6fcc60eb36f7f59747387fd10855046cd.zip |
r14923: Return False in the case a parametrical option is not configured in
the config file.
For a "somesettings: foo = " we still return an empty line.
(This used to be commit 59175ee522c5b4f9554ee734c008d8048eb1eadb)
-rw-r--r-- | source3/param/loadparm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 95c095dcf2..b7d6546fd9 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3883,6 +3883,7 @@ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal) unsigned flag = 0; fstring local_parm_name; char *parm_opt; + const char *parm_opt_value; /* check for parametrical option */ fstrcpy( local_parm_name, parm_name); @@ -3892,9 +3893,12 @@ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal) *parm_opt = '\0'; parm_opt++; if (strlen(parm_opt)) { - printf( "%s\n", lp_parm_const_string( snum, - local_parm_name, parm_opt, "")); - result = True; + parm_opt_value = lp_parm_const_string( snum, + local_parm_name, parm_opt, NULL); + if (parm_opt_value) { + printf( "%s\n", parm_opt_value); + result = True; + } } return result; } |