diff options
author | Michael Adam <obnox@samba.org> | 2008-10-21 23:20:57 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-10-27 13:02:39 +0100 |
commit | 64ab71d2d7e60c1511fd223bb05ef157ef5a2374 (patch) | |
tree | 02a924151f2acd972cebfa795f92c070eaed7a26 /source3 | |
parent | e453bf70c94e99364233734bb228df2c649b1c70 (diff) | |
download | samba-64ab71d2d7e60c1511fd223bb05ef157ef5a2374.tar.gz samba-64ab71d2d7e60c1511fd223bb05ef157ef5a2374.tar.bz2 samba-64ab71d2d7e60c1511fd223bb05ef157ef5a2374.zip |
[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
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/smbconf/smbconf_init.c | 9 |
1 files changed, 5 insertions, 4 deletions
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: |