The Samba-Bugzilla – Attachment 10257 Details for
Bug 10722
samba-tool crashes with uncaught exception when parsing include = /path/to/%U.conf in smb.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New patch for ignoring substitution vars
0001-lib-param-handle-ignore-substitution-variable-in-smb.patch (text/plain), 1.50 KB, created by
Garming Sam
on 2014-09-05 01:12:58 UTC
(
hide
)
Description:
New patch for ignoring substitution vars
Filename:
MIME Type:
Creator:
Garming Sam
Created:
2014-09-05 01:12:58 UTC
Size:
1.50 KB
patch
obsolete
>From 4df963b9ea18520bca2a7395d4d26338938fdd7c Mon Sep 17 00:00:00 2001 >From: Garming Sam <garming@catalyst.net.nz> >Date: Fri, 5 Sep 2014 13:07:09 +1200 >Subject: [PATCH] lib/param: handle (ignore) substitution variable in smb.conf > >Based on a patch by Quentin Gibeaux <qgibeaux@iris-tech.fr> > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=10722 >Change-Id: Ia4c7f2f98221497eefbb8a67dc6e8532ceae11ab >Signed-off-by: Garming Sam <garming@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >--- > lib/param/loadparm.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c >index 4154260..5f43385 100644 >--- a/lib/param/loadparm.c >+++ b/lib/param/loadparm.c >@@ -1116,8 +1116,22 @@ bool handle_include(struct loadparm_context *lp_ctx, struct loadparm_service *se > > lpcfg_string_set(lp_ctx, ptr, fname); > >- if (file_exist(fname)) >+ if (file_exist(fname)) { > return pm_process(fname, do_section, lpcfg_do_parameter, lp_ctx); >+ } else { >+ char *substitution_variable_substring; >+ substitution_variable_substring = strchr(fname, '%'); >+ >+ if (substitution_variable_substring) { >+ char next_char = substitution_variable_substring[1]; >+ if ((next_char && (next_char >= 'a' && next_char <= 'z')) >+ || (next_char >= 'A' && next_char <= 'Z')) { >+ DEBUG (2, ("Tried to load %s but variable in filename, ignoring file...\n", >+ fname)); >+ return true; >+ } >+ } >+ } > > DEBUG(2, ("Can't find include file %s\n", fname)); > >-- >1.8.3.2 >
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 10722
:
10116
|
10170
|
10171
|
10257
|
11420
|
11551
|
11552
|
11553
|
11554
|
11555
|
11702