From 437162b95cd3da4a66611559f67fa9e0ab5b01b3 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 7 Aug 2014 17:29:47 -0400 Subject: Fix tar recursion bomb if inside UR_DIR during upgrade --- ur_upgrade.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ur_upgrade.py') diff --git a/ur_upgrade.py b/ur_upgrade.py index c4a9857..3b149fa 100755 --- a/ur_upgrade.py +++ b/ur_upgrade.py @@ -165,9 +165,15 @@ class Upgrade(object): signal.signal(signal.SIGTERM, self._cleanup_on_signal) if not which('rsync'): + self._cleanup() print('++ rsync not found in PATH. Please install it.') exit(1) + if self.ureka.path in os.path.abspath(os.path.curdir): + self._cleanup() + print("Impossible. Please change to a directory above {}.".format(self.ureka.path)) + exit(1) + def run(self): if not self.force: if not ur_check_version(self.ureka, self.to_version): -- cgit