[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] [patch] fix --calculate-average and --restrict /
From: |
dean gaudet |
Subject: |
[rdiff-backup-users] [patch] fix --calculate-average and --restrict / |
Date: |
Mon, 18 Oct 2004 00:09:55 -0700 (PDT) |
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
@@ -179,6 +179,7 @@
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
@@ -195,6 +195,7 @@
"""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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [rdiff-backup-users] [patch] fix --calculate-average and --restrict /,
dean gaudet <=