From 5e3fbb162373e75697df2776b153b11e53225760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 8 Jul 2015 04:54:34 +0200 Subject: [PATCH] dom0-updates: ensure proper permissions on packages and metadata This also includes possibly error flag file. --- dom0-updates/qubes-receive-updates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0-updates/qubes-receive-updates b/dom0-updates/qubes-receive-updates index 6928cf6..7c67b42 100755 --- a/dom0-updates/qubes-receive-updates +++ b/dom0-updates/qubes-receive-updates @@ -72,6 +72,7 @@ def handle_dom0updates(updatevm): os.remove(updates_error_file) os.environ['LC_ALL'] = 'C' qubes_gid = grp.getgrnam('qubes').gr_gid + old_umask = os.umask(002) os.mkdir(updates_rpm_dir) os.chown(updates_rpm_dir, -1, qubes_gid) os.chmod(updates_rpm_dir, 0775) @@ -103,7 +104,6 @@ def handle_dom0updates(updatevm): if comps_file: createrepo_cmd += ["-g", comps_file] createrepo_cmd += ["-q", updates_dir] - old_umask = os.umask(002) subprocess.check_call(createrepo_cmd) os.chown(updates_repodata_dir, -1, qubes_gid) os.chmod(updates_repodata_dir, 0775)