From 2172f00cde8c37decce84470512348f15e883c55 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 27 Mar 2023 14:37:25 +0200 Subject: live: fix ogChangeRepo invocation Add missing samba credentials parameter in ogChangeRepo invocation. Credentials are loaded from ogClient config file. Any production deployment should use its own samba user and password. ogChangeRepo fails when using default samba credentials in a production environment. Fixes: a1edbe904b30 ("legacy: rewrite ogChangeRepo") Fixes: 3703fd60634f ("live: support native unicast cache image restore") --- src/live/ogOperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 20cedbc..6b1b01f 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -138,7 +138,7 @@ class OgLiveOperations: raise ValueError(f'Error: Cannot copy image {image_name} to cache') def _restore_image_unicast(self, repo, name, devpath, cache=False): - if ogChangeRepo(repo).returncode != 0: + if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass).returncode != 0: self._restartBrowser(self._url) logging.error('ogChangeRepo could not change repository to %s', repo) raise ValueError(f'Error: Cannot change repository to {repo}') -- cgit v1.2.3-18-g5258