lib/param: handle (ignore) substitution variable in smb.conf
authorQuentin Gibeaux <qgibeaux@iris-tech.fr>
Thu, 29 Oct 2015 12:48:27 +0000 (13:48 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 9 Dec 2015 01:05:30 +0000 (02:05 +0100)
commit3c6ea3293c6aac67bc442f47185fd494714e4806
tree111991fa72ed51f3b43923a420091e858350d2c2
parentea6de66b9c6c8f5d7e90c24ff02fe4626801a57c
lib/param: handle (ignore) substitution variable in smb.conf

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10722

The function handle_include returns false when trying to include
files that have a substitution variable in filename (like %U),
this patch makes handle_include to ignore this case, to make
samba-tool work when there is such include in samba's configuration.

Error was :
root@ubuntu:/usr/local/samba# grep 'include.*%U' etc/smb.conf
include = %U.conf
root@ubuntu:/usr/local/samba# ./bin/samba-tool user list
Can't find include file %U.conf
ERROR(runtime): uncaught exception - Unable to load default file

Signed-off-by: Quentin Gibeaux <qgibeaux@iris-tech.fr>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec  9 02:05:30 CET 2015 on sn-devel-104
lib/param/loadparm.c