diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2014-08-07 17:29:47 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2014-08-07 17:29:47 -0400 |
commit | 437162b95cd3da4a66611559f67fa9e0ab5b01b3 (patch) | |
tree | b629aeb1bab5b9a5ededdbedeac00dda3f8e2414 /ur_upgrade.py | |
parent | 386c50c24bedf0a49316398f27104cda4479ea7b (diff) | |
download | ur_upgrade-437162b95cd3da4a66611559f67fa9e0ab5b01b3.tar.gz |
Fix tar recursion bomb if inside UR_DIR during upgrade
Diffstat (limited to 'ur_upgrade.py')
-rwxr-xr-x | ur_upgrade.py | 6 |
1 files changed, 6 insertions, 0 deletions
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): |