From a9dc083c7ddf0181e5124bbae170c4ac9f752738 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 25 Nov 2013 15:13:00 -0200 Subject: Avoids the checking for an "updated" policy file for debian package. In the case of the debian package, we already take care to put the file in place, so this check is not needed. --- changes/bug_4404-do-not-install-policykit-in-deb | 1 + src/leap/bitmask/services/eip/linuxvpnlauncher.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 changes/bug_4404-do-not-install-policykit-in-deb diff --git a/changes/bug_4404-do-not-install-policykit-in-deb b/changes/bug_4404-do-not-install-policykit-in-deb new file mode 100644 index 00000000..80745c05 --- /dev/null +++ b/changes/bug_4404-do-not-install-policykit-in-deb @@ -0,0 +1 @@ +- Avoid attempt to install policykit file in debian package. Closes: #4404 diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py index d02f6f96..73a0a948 100644 --- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py +++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py @@ -148,18 +148,21 @@ class LinuxVPNLauncher(VPNLauncher): def missing_other_files(kls): """ 'Extend' the VPNLauncher's missing_other_files to check if the polkit - files is outdated. If the polkit file that is in OTHER_FILES exists but - is not up to date, it is added to the missing list. + files is outdated, in the case of an standalone bundle. + If the polkit file that is in OTHER_FILES exists but is not up to date, + it is added to the missing list. :returns: a list of missing files :rtype: list of str """ # we use `super` in order to send the class to use missing = super(LinuxVPNLauncher, kls).missing_other_files() - polkit_file = LinuxPolicyChecker.get_polkit_path() - if polkit_file not in missing: - if privilege_policies.is_policy_outdated(kls.OPENVPN_BIN_PATH): - missing.append(polkit_file) + + if flags.STANDALONE is True: + polkit_file = LinuxPolicyChecker.get_polkit_path() + if polkit_file not in missing: + if privilege_policies.is_policy_outdated(kls.OPENVPN_BIN_PATH): + missing.append(polkit_file) return missing -- cgit v1.2.3