]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/param: Don't treat a missing include file as an error in handle_include().
authorPavel Filipenský <pfilipensky@samba.org>
Tue, 20 Aug 2024 15:15:46 +0000 (17:15 +0200)
committerMartin Schwenke <martins@samba.org>
Wed, 21 Aug 2024 00:04:18 +0000 (00:04 +0000)
Same fix as in commit 09d7690

'samba-tool domain provision -d10' fails if the included file does not
exist:

lpcfg_load: refreshing parameters from /etc/samba/smb.conf
Processing section "[global]"
Can't find include file /etc/samba/usershares.conf
pm_process() returned No
ERROR: Unable to load default file
  File "/usr/lib64/python3.12/site-packages/samba/netcmd/domain/provision.py", line 183, in run
    lp = sambaopts.get_loadparm()
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/samba/getopt.py", line 282, in get_loadparm
    self._lp.load_default()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Aug 21 00:04:19 UTC 2024 on atb-devel-224

lib/param/loadparm.c

index 0afdcebb02db7b2e4978211aafcda96a9de4e89d..ed5160d547bcbc2528a6ad7ad57ffd2cd8a23b91 100644 (file)
@@ -1132,7 +1132,7 @@ bool handle_include(struct loadparm_context *lp_ctx, struct loadparm_service *se
 
        DEBUG(2, ("Can't find include file %s\n", fname));
 
-       return false;
+       return true;
 }
 
 /***************************************************************************