From 64ab71d2d7e60c1511fd223bb05ef157ef5a2374 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 21 Oct 2008 23:20:57 +0200 Subject: [s3]libsmbconf: fall back to file backend when no valid backend was found Interpret the source string as a file name when it contains a ':' sign but the initial part is not a known backend. This might occur even implicitly when "%T" is used in an include file name (even though this is not realistic..). Michael --- source3/lib/smbconf/smbconf_init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/lib/smbconf') diff --git a/source3/lib/smbconf/smbconf_init.c b/source3/lib/smbconf/smbconf_init.c index 8d5bca1902..a362a663af 100644 --- a/source3/lib/smbconf/smbconf_init.c +++ b/source3/lib/smbconf/smbconf_init.c @@ -79,11 +79,12 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, } else { /* * Separator was specified but this is not a known backend. - * Can't handle this. + * As a last resort, try to interpret the original source + * string as a file name that contains a ":" sign. + * This may occur with an include directive like this: + * 'include = /path/to/file.%T' */ - DEBUG(1, ("smbconf_init: ERROR - unknown backend '%s' given\n", - backend)); - werr = WERR_INVALID_PARAM; + werr = smbconf_init_txt(mem_ctx, conf_ctx, source); } done: -- cgit