two small fixes for 0.13.4:
- --calculate-average doesn't work at all due to arg parsing mistake
- "--restrict /" doesn't permit subpaths -- unlike restrict on "/foo" or
other paths
-dean
--- rdiff-backup-0.13.4/rdiff_backup/Main.py.dg1 2004-06-04 09:59:22.000000000 -0700
+++ rdiff-backup-0.13.4/rdiff_backup/Main.py 2004-10-17 20:26:55.000000000 -0700
< at > < at > -179,6 +179,7 < at > < at >
else:
commandline_error("Switches missing or wrong number of arguments")
elif action == 'test-server': pass # test-server takes any number of args
+ elif action == 'calculate-average': pass # calculate-average takes any number of args
elif l > 2 or action not in arg_action_dict[l]:
commandline_error("Wrong number of arguments given.")
--- rdiff-backup-0.13.4/rdiff_backup/Security.py.dg1 2004-06-04 09:59:22.000000000 -0700
+++ rdiff-backup-0.13.4/rdiff_backup/Security.py 2004-10-17 23:52:14.000000000 -0700
< at > < at > -195,6 +195,7 < at > < at >
"""Require rpath not to step outside retricted directory"""
if Globals.restrict_path and rpath.conn is Globals.local_connection:
normalized, restrict = rpath.normalize().path, Globals.restrict_path
+ if restrict == "/": return
components = normalized.split("/")
# 3 cases for restricted dir /usr/foo: /var, /usr/foobar, /usr/foo/..
if (not normalized.startswith(restrict) or
