The Samba-Bugzilla – Attachment 16221 Details for
Bug 14481
smbclient (and other utilities parsing smb.conf) fail to follow include directives
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
RFC how the parsing can be solved by not skipping includes.
0001-param-do-not-skip-non-global-includes.patch (text/plain), 1.44 KB, created by
Christian Ehrhardt
on 2020-09-11 10:00:28 UTC
(
hide
)
Description:
RFC how the parsing can be solved by not skipping includes.
Filename:
MIME Type:
Creator:
Christian Ehrhardt
Created:
2020-09-11 10:00:28 UTC
Size:
1.44 KB
patch
obsolete
>From 3154381e44923f0b7bb1f996aa24d70118d39eed Mon Sep 17 00:00:00 2001 >From: Christian Ehrhardt <christian.ehrhardt@canonical.com> >Date: Thu, 10 Sep 2020 10:42:30 +0200 >Subject: [PATCH] param: do not skip non-global includes > >Configuration content in include files can define global attributes >even if not included from a place that it itself in global context. > >This makes smb.conf behave unexpectedly as it isn't handled as >documented: "... is included literally, as though typed in place". > >Do not skip param processing for "include" params even if global_only is >set. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=14481 > >Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> >--- > source3/param/loadparm.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c >index c218e2fc372..1e33c05e491 100644 >--- a/source3/param/loadparm.c >+++ b/source3/param/loadparm.c >@@ -2738,8 +2738,13 @@ bool lp_set_cmdline(const char *pszParmName, const char *pszParmValue) > static bool do_parameter(const char *pszParmName, const char *pszParmValue, > void *userdata) > { >- if (!bInGlobalSection && bGlobalOnly) >- return true; >+ if (!bInGlobalSection && bGlobalOnly) { >+ if (strcmp(pszParmName,"include") == 0) { >+ DEBUGADD(4, ("not skipping non-global include\n")); >+ } else { >+ return true; >+ } >+ } > > DEBUGADD(4, ("doing parameter %s = %s\n", pszParmName, pszParmValue)); > >-- >2.28.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14481
: 16221