From: Joseph Sutton Date: Wed, 26 May 2021 23:47:36 +0000 (+1200) Subject: netcmd: Use correct path for state directory during offline backup X-Git-Tag: tevent-0.11.0~415 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb0d71b358702f1d57568fd016251587c2050386;p=thirdparty%2Fsamba.git netcmd: Use correct path for state directory during offline backup During the restore process, we use make_smbconf() to create a new smb.conf file with the default paths. The default location for 'state directory' is 'state', but we currently rename this directory to 'statedir' on backing up, so it will end up pointing to a non-existent directory. This commit ensures the names are consistent. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py index a9c840d3cae..b5874b305b2 100644 --- a/python/samba/netcmd/domain_backup.py +++ b/python/samba/netcmd/domain_backup.py @@ -1077,7 +1077,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command): # Find where a path should go in the fixed backup archive structure. def get_arc_path(self, path, conf_paths): backup_dirs = {"private": conf_paths.private_dir, - "statedir": conf_paths.state_dir, + "state": conf_paths.state_dir, "etc": os.path.dirname(conf_paths.smbconf)} matching_dirs = [(_, p) for (_, p) in backup_dirs.items() if path.startswith(p)]