mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r14869: Allow to dump a paramatrical option.
Flaw: We print an empty line if the paramatrical option is not defined
in the requested section.
(This used to be commit a0d84ccc02
)
This commit is contained in:
parent
e4998337e7
commit
570b49f33f
@ -3880,13 +3880,31 @@ BOOL dump_a_parameter(int snum, char *parm_name, FILE * f, BOOL isGlobal)
|
||||
int i, result = False;
|
||||
parm_class p_class;
|
||||
unsigned flag = 0;
|
||||
fstring local_parm_name;
|
||||
char *parm_opt;
|
||||
|
||||
/* check for parametrical option */
|
||||
fstrcpy( local_parm_name, parm_name);
|
||||
parm_opt = strchr( local_parm_name, ':');
|
||||
|
||||
if (parm_opt) {
|
||||
*parm_opt = '\0';
|
||||
parm_opt++;
|
||||
if (strlen(parm_opt)) {
|
||||
printf( "%s\n", lp_parm_const_string( snum,
|
||||
local_parm_name, parm_opt, ""));
|
||||
result = True;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* check for a key and print the value */
|
||||
if (isGlobal) {
|
||||
p_class = P_GLOBAL;
|
||||
flag = FLAG_GLOBAL;
|
||||
} else
|
||||
p_class = P_LOCAL;
|
||||
|
||||
|
||||
for (i = 0; parm_table[i].label; i++) {
|
||||
if (strwicmp(parm_table[i].label, parm_name) == 0 &&
|
||||
(parm_table[i].p_class == p_class || parm_table[i].flags & flag) &&
|
||||
|
Loading…
Reference in New Issue
Block a user