The Samba-Bugzilla – Attachment 11420 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]
fix of the patch in regard to Douglas Bagnall and Michael Adam comments
[fixed]_ignore_substitution_variable_in_smb.patch (text/plain), 1.23 KB, created by
Quentin Gibeaux
on 2015-09-09 10:14:09 UTC
(
hide
)
Description:
fix of the patch in regard to Douglas Bagnall and Michael Adam comments
Filename:
MIME Type:
Creator:
Quentin Gibeaux
Created:
2015-09-09 10:14:09 UTC
Size:
1.23 KB
patch
obsolete
>From 3f4ac4603a0bb310b43d9a3e9a6462c35c04f6ec Mon Sep 17 00:00:00 2001 >From: Quentin Gibeaux <qgibeaux@iris-tech.fr> >Date: Wed, 9 Sep 2015 12:07:20 +0200 >Subject: [PATCH] lib/param: handle (ignore) substitution variable in smb.conf > >--- > 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 a0700a9..72e53f7 100644 >--- a/lib/param/loadparm.c >+++ b/lib/param/loadparm.c >@@ -1101,8 +1101,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 >= '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.7.9.5 >
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
Flags:
qgibeaux
:
review+
Actions:
View
Attachments on
bug 10722
:
10116
|
10170
|
10171
|
10257
|
11420
|
11551
|
11552
|
11553
|
11554
|
11555
|
11702